Skip to content
Dashboard
Theme
Theme

Create a permission

POST /v1/authorization/permissions: Create a permission.

View Markdown

POST /v1/authorization/permissions

Scope
authorization:write
Auth
Secret key (sk_…)
Since
1.0
  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • slug string Required

    A permission the developer’s app checks, such as reports:read.

  • name string

    max length 200

  • description string

    max length 1000

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/authorization/permissions" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "acme"
}'
Response 201
{
"id": "perm_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "permission",
"slug": "acme",
"name": "Acme Corp",
"description": "Primary SSO connection for Acme Corp.",
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}