# Create resource

Create a resource in a specific tenant. Required permissions: resources:create, apps:create, [appId]:create.

Endpoint: POST /v1/resources
Security: ClientAccessToken

## Request fields (application/json):

  - `name` (string, required)
    Name of the resource
    Example: "My Resource"

  - `description` (string)
    Short description of the resource

  - `uri` (string, required)
    URI that identifies the resource, which is reflected in the audience (aud claim) of the access token

  - `access_token_ttl` (number, required)
    Access token expiration in seconds

  - `refresh_token_ttl` (number, required)
    Refresh token expiration in seconds

  - `max_refresh_rotate` (number, required)
    Absolute lifetime of a refresh token in seconds, after which it can no longer be used or rotated

## Response 201 fields (application/json):

  - `result` (object, required)

  - `result.resource_id` (string, required)
    Resource ID

  - `result.tenant_id` (string, required)
    Tenant ID

  - `result.name` (string, required)
    Resource friendly name

  - `result.description` (string)
    Resource description

  - `result.uri` (string, required)
    Resource URI

  - `result.access_token_ttl` (number, required)
    Access token expiration in seconds

  - `result.refresh_token_ttl` (number, required)
    Refresh token expiration in seconds

  - `result.max_refresh_rotate` (number, required)
    Absolute lifetime of a refresh token in seconds, after which it can no longer be used or rotated

  - `result.created_at` (string, required)
    Date the resource was created

  - `result.updated_at` (string, required)
    Date the resource was last updated

## Response 400 fields (application/json):

  - `message` (array, required)
    Example: "Bad request"

  - `error_code` (number, required)
    Example: 400


