DenserAIDenserAI Docs
API

REST API

Call Chatbot via REST API

Use the REST API to query a Denser chatbot from anywhere--your product, internal tools, or automations. This quick start walks you through making your first request.

To send a request, you need two values: an API key and a chatbot ID. Get both below, then run the test request.

1. Generate an API key

Open the chatbot you want to query, then open Settings.

Select the API Keys tab.

Click Generate API Key to create one, then copy it — the key is shown only once.

The API Keys panel in Settings, showing the Generate API Key button to create your first key

Regenerating disables the old key

Regenerating the API key immediately invalidates the previous one. Update every place that uses the old key after rotating.

For more on managing and securing keys, see API Keys.

2. Find your chatbot ID

In the header bar, click the share icon next to the chatbot name to open its menu.

Choose Copy chatbot ID to copy the ID to your clipboard.

Copying the chatbot ID from the share menu in the dashboard header, showing the Share chatbot link and Copy chatbot ID options

3. Send a test request

Test the API with curl. Replace <chatbot-id> and <api-key> with the values from the steps above, and <example-question> with the question you want to ask.

curl https://denser.ai/api/query -X POST -H "Content-Type: application/json" -d \
'{
  "chatbotId": "<chatbot-id>",
  "question": "<example-question>",
  "key": "<api-key>"
}'

Go further

Explore payload options, streaming responses, and error codes in the API reference.

On this page