Add organization application role

POST /api/organizations/{id}/applications/{applicationId}/roles

Add a role to the application in the organization.

Path parameters

  • id string Required

    The unique identifier of the organization.

  • applicationId string Required

    The unique identifier of the application.

application/json

Body Required

  • organizationRoleIds array[string] Required

    The role ID to add.

    Minimum length of each is 1.

Responses

  • 201 application/json

    The role was added successfully.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    The role could not be added. Some of the roles may not exist.

POST /api/organizations/{id}/applications/{applicationId}/roles
curl \
 --request POST 'https://[tenant_id].logto.app/api/organizations/{id}/applications/{applicationId}/roles' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"organizationRoleIds":["string"]}'
Request examples
{
  "organizationRoleIds": [
    "string"
  ]
}