# JSON API and WebSockets

**URL:** <https://discuss.jsonapi.org/t/json-api-and-websockets/152>\
**Category:** Uncategorized\
**Created:** [October 8, 2015, 9:49pm UTC](https://discuss.jsonapi.org/t/json-api-and-websockets/152 "2015-10-08T21:49:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erickt](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/erickt/32/85_2.png) [@erickt](https://discuss.jsonapi.org/u/erickt)\
**Post date:** [October 8, 2015, 9:49pm UTC](https://discuss.jsonapi.org/t/json-api-and-websockets/152/1 "2015-10-08T21:49:16Z")

</div>

Good afternoon. Has anyone put any thought into how JSON API might work with WebSockets? I’m considering using JSON API for a REST service which may someday grow support for WebSockets in order to better support things like lower overhead request/replies and pushing events to a listening service/browser. Is it worth trying to wrap messages in a JSON API envelope?

---

<div class="post-metadata">

**Author:** ![ethanresnick](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@ethanresnick](https://discuss.jsonapi.org/u/ethanresnick)\
**Post date:** [October 11, 2015, 11:52pm UTC](https://discuss.jsonapi.org/t/json-api-and-websockets/152/2 "2015-10-11T23:52:16Z")

</div>

Hi!

Yes, we’ve actively been thinking about how JSON API might work over other protocols (and, in particular, Websockets considerations have influenced the design of [#795](https://github.com/json-api/json-api/issues/795) and [#824](https://github.com/json-api/json-api/pull/824)). There isn’t a final spec yet for non-HTTP protocols, but you can safely count on one existing eventually, and that it will use a very similar message format as JSON API over HTTP.

---

<div class="post-metadata">

**Author:** ![erickt](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/erickt/32/85_2.png) [@erickt](https://discuss.jsonapi.org/u/erickt)\
**Post date:** [October 15, 2015, 7:38pm UTC](https://discuss.jsonapi.org/t/json-api-and-websockets/152/3 "2015-10-15T19:38:24Z")

</div>

Thanks @ethanresnick! I’ll track those issues.
