# Inserting Metadata Into Requests

**URL:** <https://community.auth0.com/t/inserting-metadata-into-requests/70491>\
**Category:** Get Help\
**Tags:** m2m, api\
**Created:** [September 29, 2021, 2:16pm UTC](https://community.auth0.com/t/inserting-metadata-into-requests/70491 "2021-09-29T14:16:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.pinzon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/a.pinzon/32/30676_2.png) [@a.pinzon](https://community.auth0.com/u/a.pinzon)\
**Post date:** [September 29, 2021, 2:16pm UTC](https://community.auth0.com/t/inserting-metadata-into-requests/70491/1 "2021-09-29T14:16:31Z")

</div>

Hi everyone,  
I’m building a customer API where merchants can create orders, transactions, etc.

I would like each customer to be able to submit requests to my backend, but I’m able to convey certain metadata to my backend, in particular, the customer ID on my end so that all requests are created/retrieved for that specific merchant.

How can I accomplish this? Any ideas?

Thanks,

Alejandro

---

<div class="post-metadata">

**Author:** ![mmbmf1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mmbmf1/32/26154_2.png) [@mmbmf1](https://community.auth0.com/u/mmbmf1)\
**Post date:** [September 29, 2021, 8:39pm UTC](https://community.auth0.com/t/inserting-metadata-into-requests/70491/2 "2021-09-29T20:39:45Z")

</div>

Hi @a.pinzon,

Related to your post here: [Multiple users for Machine to Machine applications - #3 by a.pinzon](https://community.auth0.com/t/multiple-users-for-machine-to-machine-applications/70444/3) there might be a couple of ways to do this.

You can add properties to an id token for a user via Auth0 Actions: [Auth0 Actions](https://auth0.com/docs/actions). During the login flow, you can validate the properties on the id token.

Alternatively, if your customers are requesting an access token to then hit your API, you could add scopes (permissions) with required metadata to the token to verify the correct merchant: [Scopes](https://auth0.com/docs/configure/apis/scopes).

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 1, 2021, 10:21am UTC](https://community.auth0.com/t/inserting-metadata-into-requests/70491/3 "2021-10-01T10:21:58Z")

</div>

Thanks for sharing that with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 6, 2021, 2:45pm UTC](https://community.auth0.com/t/inserting-metadata-into-requests/70491/4 "2021-10-06T14:45:34Z")

</div>


