Create an organization role

POST /api/organization-roles

Create a new organization role with the given data.

application/json

Body Required

  • name string Required

    The name of the organization role. It must be unique within the organization template.

    Minimum length is 1, maximum length is 128.

  • description string | null

    The description of the organization role.

    Maximum length is 256.

  • organizationScopeIds array[string] Required

    An array of organization scope IDs to be assigned to the organization role.

    Default value is [] (empty).

  • An array of resource scope IDs to be assigned to the organization role.

Responses

  • 201

    The organization role was created successfully.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    The organization role name is already in use.

POST /api/organization-roles
curl \
 -X POST https://[tenant_id].logto.app/api/organization-roles \
 -H "Content-Type: application/json" \
 -d '{"name":"string","description":"string","organizationScopeIds":[]}'
Request example
{
  "name": "string",
  "description": "string",
  "organizationScopeIds": []
}