Add user members to organization

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Logto API references MCP server": {
  "url": "https://openapi.logto.io/mcp"
}
Close
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.

    Hide response attribute Show response attribute object
    • userIds array[string] Required

      An array of user IDs processed from the request. This may include IDs that were already members of the organization.

      Minimum length of each is 1.

  • 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 \
 --request POST 'https://[tenant_id].logto.app/api/organizations/{id}/users' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"userIds":["string"]}'
Request examples
{
  "userIds": [
    "string"
  ]
}
Response examples (201)
{
  "userIds": [
    "string"
  ]
}