Add user members to organization

POST /api/organizations/{id}/users

Add users as members to the specified organization with the given user IDs.

Path parameters

  • id string Required

    The unique identifier of the organization.

application/json

Body Required

  • userIds array[string] Required

    An array of user IDs to be added to the organization. Organization existed users assignment will be ignored.

    Minimum length of each is 1.

Responses

  • 201 application/json

    Users were added to the organization successfully.

  • Bad Request

  • Unauthorized

  • Forbidden

  • At least one of the IDs provided is not valid. For example, the organization ID or user ID does not exist.

POST /api/organizations/{id}/users
curl \
 -X POST https://[tenant_id].logto.app/api/organizations/{id}/users \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"userIds":["string"]}'
Request examples
{
  "userIds": [
    "string"
  ]
}