API Keys

Create a new API key

Creates a new API key for an organization. The raw key is only returned once in the response.

post/api/org-api-keys

Request

  • Base URL
    https://app.dailyplay.ai
  • Auth
    HTTP bearer

Request body

org_idinteger required

Organization ID

namestring required

Descriptive name for the key

descriptionstring

Optional description

allowed_game_idsinteger[] nullable

Restrict key to specific game IDs. Null = all games.

allowed_stream_idsinteger[] nullable

Restrict key to specific stream IDs. Null = all streams.

rate_limit_per_minuteinteger

Max requests per minute

rate_limit_per_dayinteger

Max requests per day

expires_atstring date-time

Optional auto-expiry date

Example request

{
  "org_id": 1,
  "name": "Production CRM",
  "description": "Used by the CRM to issue game links",
  "allowed_game_ids": [
    42,
    43
  ],
  "rate_limit_per_minute": 60,
  "rate_limit_per_day": 10000,
  "expires_at": "2027-01-01T00:00:00Z"
}

Response

API key created. The key field is only included in this response.

successboolean

Example response

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Production CRM",
    "key_prefix": "dpk_a1b2",
    "key": "dpk_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.