Skip to content

Rocketfuel API Integration

API Endpoint

To integrate with the Rocketfuel API, send a POST request to the following endpoint:

https://api.boxtalk.ai/api/v1/integrations

Request Format

Use the following cURL command to make a request:

curl -X POST https://api.boxtalk.ai/api/v1/integrations \
  -H 'Content-Type: application/json' \
  -H 'X-Rocketfuel-Client-Id: $CLIENT_ID' \
  -H 'X-Rocketfuel-Conversation-Id: $X-Rocketfuel-Conversation-Id|Optional'
  -H 'Authorization: Bearer $TOKEN' \
  -d '{"prompt": "$TEXT"}'

Headers:

  • Content-Type: application/json – Specifies the request body format.
  • X-Rocketfuel-Client-Id: $CLIENT_ID – Your Rocketfuel client ID for authentication.
  • Authorization: Bearer $TOKEN – Your API token for authentication.
  • Optional: X-Rocketfuel-Conversaition-Id - We will create and then expect it passed back and forth for the current conversation.

Request Body:

  • prompt (string, required) – The input text to be processed.

Response Format

The API returns a JSON response in the following format:

{
    "thoughts": ["string"],
    "sql_query": "string",
    "result": "string"
}

Response Fields:

  • thoughts (array of strings) – Internal debugging insights (should not be exposed to users).
  • sql_query (string) – Auto-generated SQL query for internal validation (should not be exposed to users).
  • result (string) – The final output.

Session Handling

The first request sets an X-Rocketfuel-Conversstion-Id that is passed with each new request for the conversation.