Create API resource scope
Create a new scope (permission) for an API resource.
Path parameters
-
The unique identifier of the resource.
Body Required
-
The name of the scope. It should be unique for the resource.
Minimum length is
1
, maximum length is256
. -
description string | null
POST
/api/resources/{resourceId}/scopes
curl \
-X POST https://[tenant_id].logto.app/api/resources/{resourceId}/scopes \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string"}'
Request examples
{
"name": "string",
"description": "string"
}
Response examples (201)
{
"tenantId": "string",
"id": "string",
"resourceId": "string",
"name": "string",
"description": "string",
"createdAt": 42.0
}