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
      • GETGet All Groups
      • POSTCreate Group
      • GETGet Group
      • POSTUpdate Group
      • DELDelete Group
      • POSTGenerate JWT Token
      • POSTAdd Entities
      • POSTRemove Entities
        • GETSearch Group Users
        • POSTCreate Group User
        • GETGet Group User
        • POSTUpdate Group User
        • DELDelete Group User
        • POSTGenerate JWT Token
        • POSTSync Group Users
Logo
Sign inBook a demo
API ReferenceEntity GroupUser

Sync Group Users

POST
https://api.mercoa.com/entityGroup/:entityGroupId/sync-users
POST
/entityGroup/:entityGroupId/sync-users
$curl -X POST https://api.mercoa.com/entityGroup/entg_8545a84e-a45f-41bf-bdf1-33b42a55812c/sync-users \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "filterRoles": [
> "approver",
> "viewer"
> ]
>}'
Sync entity group users. This will add users to entities that do not have them and remove users from entities that have them.
Was this page helpful?
Previous

Get All

Next
Built with

Authentication

AuthorizationBearer

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

Path parameters

entityGroupIdstringRequired
Entity Group ID or Entity Group ForeignID

Request

This endpoint expects an object.
copyUsersFromstringOptional

Entity ID / foreign ID of an entity currently in the group to copy users and roles from. If not provided, users will be synced from the entity with the most users that has been updated most recently.

filterRoleslist of stringsOptional
List of roles to filter users by. If not provided, all users will be copied. If provided, only users with the provided roles will be copied.
addUsersbooleanOptional
If true, users will be added to entities if they are not found in the copyUsersFrom entity. Default is true.
removeUsersbooleanOptional
If true, users will be removed from entities if they are not found in the copyUsersFrom entity. Default is false.

Errors

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