Authentication

Generate and use an API Key to authenticate Project Integration API requests.

Every request to the Project Integration APIs requires an API Key in the api-key header. You generate this key from your project's integration settings.

Generating your API Key

  1. Go to your project's Integrations page and click Manage on API Integration
API Integration
  1. Click Generate API Key to create a new key

  2. Copy your generated API key

Copy API Key

The widget_uid is your chatbot's Widget ID. You can find it on the same Integrations page.

Using your API Key

Pass the key in the api-key header on every request:

curl -X POST https://api.yourgpt.ai/chatbot/v1/createSession \
  -H "api-key: apk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"widget_uid": "your-widget-uid"}'

All API keys use the apk- prefix:

apk-ca1b2c3d4e5f...

Response format

All endpoints return a consistent JSON structure:

  • Success: HTTP 200 with "type": "RXSUCCESS"
  • Error: HTTP 400 with "type": "RXERROR"

Error codes

StatusMeaning
400Bad request — missing or invalid parameters
401Invalid or missing API key
403API key does not have access to the requested resource

Looking for Platform API authentication? See Platform API Authentication for API Token setup.

On this page