OpenAI is a leading organization driving advancements in chatbot technology, revolutionizing natural language processing capabilities and redefining how we interact with AI-powered systems.

Welcome to the OpenAI documentation for Dashbot! Integrating Dashbot into your OpenAI application is quick and easy.

Obtain OpenAI API Key

  1. Visit the OpenAI API platform's website and log in to your account.
  2. Navigate to the "API keys" section in your account settings.
  3. Click on the "New API Key" button to create a new key.
  4. Provide a name for your API key to help you identify it later.
  5. Once created, the new API key will be displayed.
  6. Copy this key and store it securely.
  7. Use this API key in your application's Authorization header as Bearer YOUR_API_KEY to authenticate your API requests.

Accessing Data from OpenAI Endpoints

We will focus on two endpoints under their reporting API:

Retrieve message


Example GET request:

curl \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Beta: assistants=v1"

Retrieve thread


Example GET request:

curl \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Beta: assistants=v1"

POST responses to Dashbot

When your bot receives a message, post the data to the following endpoint:

Make sure to set the ‘Content-Type’ header to ‘application/json’ and to replace API_KEY_HERE with your api key.

You must send the data with the following fields:

  • text – string – (required)
  • userId – string – (required) – should be the SAME userId for both incoming and outgoing messages this is NOT the bot’s user ID

To review all optional fields see our API reference.

The data to POST should pass the following data:

  "text": "Hi, bot",
  "userId": "+14155551234",
  "platformJson": {
    "whateverJson": "any JSON specific to your platform can be stored here"

Sample cURL

curl -X POST -H "Content-Type: application/json"
     -d '{"text":"Hi, bot","userId":"+14155551234","platformJson":{"whateverJson":"any JSON specific to your platform can be stored here"}}'

Notice, you must replace the placeholder API_KEY_HERE above with your api key.