Skip to main content
POST
/
api-auth
/
apps
Create API auth app
curl --request POST \
  --url https://api.wacht.dev/api-auth/apps \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "app_slug": "my-integration",
  "name": "My App",
  "key_prefix": "sk_live",
  "user_id": "<string>",
  "organization_id": "<string>",
  "workspace_id": "<string>",
  "description": "Production application",
  "rate_limit_scheme_slug": "default-rate-limits",
  "permissions": [
    "<string>"
  ],
  "resources": [
    "<string>"
  ]
}
'
{
  "id": "1234567890123456789",
  "deployment_id": "9876543210987654321",
  "user_id": "<string>",
  "organization_id": "<string>",
  "workspace_id": "<string>",
  "app_slug": "my-app",
  "name": "My App",
  "key_prefix": "sk_live",
  "description": "Production application",
  "is_active": true,
  "permissions": [
    "<string>"
  ],
  "resources": [
    "<string>"
  ],
  "rate_limit_scheme_slug": "default-rate-limits",
  "rate_limits": [
    {
      "unit": "minute",
      "duration": 1,
      "max_requests": 100,
      "mode": "per_key",
      "endpoints": [
        "*"
      ],
      "priority": 0
    }
  ],
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "deleted_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication (format: Bearer {api_key})

Body

application/json
app_slug
string
required

Unique slug identifier for the app

Example:

"my-integration"

name
string
required

App display name

Example:

"My App"

key_prefix
string
required

API key prefix used for keys in this app

Example:

"sk_live"

user_id
string | null

Contextual user ID for this app

organization_id
string | null

Contextual organization ID for this app

workspace_id
string | null

Contextual workspace ID for this app

description
string

App description

Example:

"Production application"

rate_limit_scheme_slug
string | null

Slug of the rate limit scheme to apply

Example:

"default-rate-limits"

permissions
string[] | null

Granted permissions for the app

resources
string[] | null

Granted resources for the app

Response

API auth app created

id
string

App ID

Example:

"1234567890123456789"

deployment_id
string

Deployment ID

Example:

"9876543210987654321"

user_id
string | null

Linked user ID

organization_id
string | null

Linked organization ID

workspace_id
string | null

Linked workspace ID

app_slug
string

App slug

Example:

"my-app"

name
string

App name

Example:

"My App"

key_prefix
string

API key prefix used for this app

Example:

"sk_live"

description
string | null

App description

Example:

"Production application"

is_active
boolean

Whether the app is active

Example:

true

permissions
string[]

Granted permissions for the app

resources
string[]

Granted resources for the app

rate_limit_scheme_slug
string | null

Slug of the applied rate limit scheme

Example:

"default-rate-limits"

rate_limits
object[]

Rate limit rules (resolved from scheme)

created_at
string<date-time>

Creation timestamp

Example:

"2024-01-15T10:30:00Z"

updated_at
string<date-time>

Last update timestamp

Example:

"2024-01-15T10:30:00Z"

deleted_at
string<date-time> | null

Deletion timestamp