# Post one type but respond with another

**URL:** <https://discuss.jsonapi.org/t/post-one-type-but-respond-with-another/1991>\
**Category:** Uncategorized\
**Created:** [July 5, 2020, 6:08pm UTC](https://discuss.jsonapi.org/t/post-one-type-but-respond-with-another/1991 "2020-07-05T18:08:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![haggen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/haggen/32/696_2.png) [@haggen](https://discuss.jsonapi.org/u/haggen)\
**Post date:** [July 5, 2020, 6:08pm UTC](https://discuss.jsonapi.org/t/post-one-type-but-respond-with-another/1991/1 "2020-07-05T18:08:05Z")

</div>

I’m thinking of instances where there’s a relation of “request resource” and “response resource”. For example; sessions; I’m posting credentials (or “session request”) but am getting a session in return.

I’m making this distinction because they are not the same type of resource and often don’t overlap.

Following the same example; credentials have email and password, possibly a PIN, but a session has authorization token, an expiration date, a relationship with a user resource, etc.

I couldn’t find anything explicitly against it in the spec but I wanted to be sure; how should I handle cases like that?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![prathe](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/prathe/32/643_2.png) [@prathe](https://discuss.jsonapi.org/u/prathe)\
**Post date:** [July 9, 2020, 8:38pm UTC](https://discuss.jsonapi.org/t/post-one-type-but-respond-with-another/1991/2 "2020-07-09T20:38:30Z")

</div>

Hello,

This is typical when POSTing to a resource. It often understands different representations. It creates resources that may not be represented at all as the representations it understand. A resource is not bound to a single representation. I am pretty sure json:api would not go against those principles.
