Add users to a structure

Adds up to 100 users to a structure as direct members. This endpoint supports partial success: the memberships that were created are returned in structure_memberships, and any assignment that failed is reported in errors with a status code and a reason. A response with a populated errors array is still a 200.

Use this endpoint to add one or more users to a structure as direct members. Send up to 100 user IDs per request. Users must already belong to your organization before you add them to a structure.

A user who already reaches this structure through an inherited membership from an ancestor can still be added directly, and the direct membership is the one that carries their role.

Requirements

This endpoint supports partial success, so a request that adds 100 users does not fail because one of them could not be assigned. The response is a 200 in that case:

  • structure_memberships holds the memberships that were created.
  • errors holds one entry per rejected assignment, each carrying the user ID, a status code and a human-readable reason. user_name is included where it could be resolved, so you can surface the failure without a second lookup.

Always inspect errors. An empty array is the only confirmation that every assignment succeeded.

πŸ“˜

New members receive the default role for the structure's type. Changing a member's role is only available via the web app.

Path Params
string
required

The unique identifier of the structure.

Body Params

Request message to add one or more users to a structure.

user_ids
array of strings
required

The unique identifiers of the users to add. Limited to 100 users per request.

user_ids*
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json