For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
HomeGuidesAPI ReferenceGlossary
  • API Reference
      • GETSearch entities
      • POSTCreate entity
      • GETGet entity
      • POSTUpdate entity
      • DELDelete entity
      • POSTAccept Terms of Service
      • POSTInitiate KYB
      • POSTGenerate JWT Token
      • GETGenerate Onboarding Link
      • POSTSend Onboarding Email
      • GETEvents
        • GETSearch entity users
        • POSTCreate entity user
        • GETGet entity user
        • POSTUpdate entity user
        • DELDelete entity user
        • POSTGenerate JWT Token
Logo
Sign inBook a demo
API ReferenceEntityUser

Create entity user

POST
https://api.mercoa.com/entity/:entityId/user
POST
/entity/:entityId/user
$curl -X POST https://api.mercoa.com/entity/ent_a0f6ea94-0761-4a5e-a416-3c453cb7eced/user \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "foreignId": "MY-DB-ID-12345",
> "email": "john.doe@acme.com",
> "name": "John Doe",
> "roles": [
> "admin",
> "approver"
> ]
>}'
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

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
The ID used to identify this user in your system.
emailstring
namestring

Errors

400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
409
Conflict
500
Internal Server Error
501
Unimplemented