# Request template for POST methods

**URL:** <https://forum.serverless.com/t/request-template-for-post-methods/459>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [October 5, 2016, 9:36am UTC](https://forum.serverless.com/t/request-template-for-post-methods/459 "2016-10-05T09:36:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![endymion](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/endymion/32/178_2.png) [@endymion](https://forum.serverless.com/u/endymion)\
**Post date:** [October 5, 2016, 9:36am UTC](https://forum.serverless.com/t/request-template-for-post-methods/459/1 "2016-10-05T09:36:57Z")

</div>

When a POST is received, which is the template I should define for the request?

Example:

Body POST:

{  
“email”: "xxxxx@xxxxx.com",  
password:“a password”  
}

How can I define a template for this body post in serverless.yml file?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![ianserlin](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/ianserlin/32/34_2.png) [@ianserlin](https://forum.serverless.com/u/ianserlin)\
**Post date:** [October 5, 2016, 4:29pm UTC](https://forum.serverless.com/t/request-template-for-post-methods/459/2 "2016-10-05T16:29:34Z")

</div>

Hey @endymion,

You actually do not need to. If you deploy with v1.0.0-rc1 or greater you should receive your `event` in your handler as

```
{ body: { email: "email", password: "password" } }

```

automatically. If you do want to do something more fancy, the docs you are looking for are here: [https://github.com/serverless/serverless/blob/master/docs/02-providers/aws/events/01-apigateway.md](https://github.com/serverless/serverless/blob/master/docs/02-providers/aws/events/01-apigateway.md)

Cheers!

- Ian  
[useful.io](http://useful.io)

---

<div class="post-metadata">

**Author:** ![endymion](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/endymion/32/178_2.png) [@endymion](https://forum.serverless.com/u/endymion)\
**Post date:** [October 5, 2016, 8:35pm UTC](https://forum.serverless.com/t/request-template-for-post-methods/459/3 "2016-10-05T20:35:59Z")

</div>

Hi @ianserlin,

Thank you very much for your help! 🙂
