Create an API resource

POST /api/resources

Create an API resource in the current tenant.

application/json

Body Required

  • name string Required

    The name of the resource.

    Minimum length is 1.

  • indicator string Required

    The unique resource indicator. Should be a valid URI.

    Minimum length is 1.

  • The access token TTL in seconds. It affects the exp claim of the access token granted for this resource.

    Default value is 3600.

Responses

POST /api/resources
curl \
 -X POST https://[tenant_id].logto.app/api/resources \
 -H "Content-Type: application/json" \
 -d '{"name":"string","indicator":"string","accessTokenTtl":3600}'
Request example
{
  "name": "string",
  "indicator": "string",
  "accessTokenTtl": 3600
}