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

    Users were added to the organization successfully.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    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 "Content-Type: application/json" \
 -d '{"userIds":["string"]}'
Request examples
{
  "userIds": [
    "string"
  ]
}