Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
HomeGuidesAPI ReferenceGlossary
  • API Reference
Logo
Sign inBook a demo
API ReferenceEntityUser

Create entity user

POST
https://api.mercoa.com/entity/:entityId/user
POST
/entity/:entityId/user
1curl -X POST https://api.mercoa.com/entity/ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced/user \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "foreignId": "MY-DB-ID-12345",
6 "email": "john.doe@acme.com",
7 "name": "John Doe",
8 "roles": [
9 "admin",
10 "approver"
11 ]
12}'
Try it
200Successful
1{
2 "id": "user_ec3aafc8-ea86-408a-a6c1-545497badbbb",
3 "roles": [
4 "admin",
5 "approver"
6 ],
7 "createdAt": "2024-01-01T00:00:00Z",
8 "updatedAt": "2024-01-01T00:00:00Z",
9 "foreignId": "MY-DB-ID-12345",
10 "email": "john.doe@acme.com",
11 "name": "John Doe"
12}
Was this page helpful?
Previous

Get entity user

Next
Built with
Get entity user

Authentication

AuthorizationBearer
Bearer authentication of the form `Bearer <token>`, where token is your auth token.

Path parameters

entityIdstringRequired
Entity ID or Entity ForeignID

Request

This endpoint expects an object.
foreignIdstringOptional
The ID used to identify this user in your system.
emailstringOptional
namestringOptional
roleslist of stringsOptional

List of roles. A role can be any string. For example: “payer”, “approver”, “viewer”

Response

This endpoint returns an object.
idstring
roleslist of strings
createdAtdatetime
updatedAtdatetime
foreignIdstring or null
The ID used to identify this user in your system.
emailstring or null
namestring or null

Errors

Entity ID or Entity ForeignID

Bearer authentication of the form Bearer <token>, where token is your auth token.