Skip to main content
POST
/
apikeys
Create
curl --request POST \
  --url https://{appId}.api-{region}.cometchat.io/v3/apikeys \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "name": "<string>",
  "scope": "authOnly"
}
'
{
  "data": {
    "apiKey": "f1915e328e249ffaaafd97fb46a57ba55d233fbf",
    "name": "John's apiKey",
    "scope": "authOnly",
    "createdAt": 1625206799
  }
}

Documentation Index

Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Constraints

ItemConstraintNotes
API Key name100 characters (UTF8mb4)Supports all languages and emojis (one emoji uses two characters)
Maximum API keys per app25Contact support if you need additional API keys
Required scopefullAccessRequires an existing API key with fullAccess scope to create new keys

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Body

application/json
name
string
required

Friendly name for the API key.

scope
enum<string>
default:authOnly
required

Scope for the API key.

Available options:
authOnly,
fullAccess

Response

200 - application/json

Created API key

data
object