Back to API Settings

Using the Dobby API

The production web app lives at https://dobby.now. Call the HTTP API like other REST services (for example OpenAI): HTTPS, a stable base URL, an authentication header on each request, and JSON responses. Paths below use the /v1 prefix.

Base URL for requests

Use production integrations against:

https://dobby.now/v1

Same idea as OpenAI’s https://api.openai.com/v1: append paths such as /threads or /threads/…/messages.

Developing locally with Docker or uvicorn? Point requests at your machine’s /v1 URL (often http://localhost:8000/v1). The snippets here stay on https://dobby.now so copied examples match production.

Authentication

Send exactly one of these on each request:

Use caseHeaderValue
Scripts, servers, integrationsX-API-Keypk_…:sk_… — one string: public key, colon, secret key.
Signed-in sessionAuthorizationBearer <access_token> — token from signing in to the web app.

Sign in at https://dobby.now, then create keys under Settings → API keys. Store the combined key in a secret such as DOBBY_API_KEY.

Request format

  • Use GET, POST, PATCH, PUT, or DELETE as documented for each endpoint.
  • JSON bodies: set Content-Type: application/json and send UTF-8 JSON.
  • Some endpoints use form fields instead (for example POST /threads with field name) — use multipart/form-data or -F in curl.
  • Successful responses are usually JSON with HTTP 200 or 201.

Examples

List threads (GET)

curl -sS -H "X-API-Key: pk_your_public_key:sk_your_secret_key" \
  "https://dobby.now/v1/threads"

Create a message (POST JSON)

Fields: type, content, and optionally is_llm_message (boolean).

curl -sS -X POST "https://dobby.now/v1/threads/THREAD_ID_HERE/messages" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: pk_your_public_key:sk_your_secret_key" \
  -d '{
    "type": "user",
    "content": "Hello from my integration.",
    "is_llm_message": true
  }'

Create a thread (POST form)

Uses form field name, not JSON.

curl -sS -X POST "https://dobby.now/v1/threads" \
  -H "X-API-Key: pk_your_public_key:sk_your_secret_key" \
  -F 'name=My new conversation'

JavaScript fetch with API key

const apiBase = "https://dobby.now/v1";
const apiKey = process.env.DOBBY_API_KEY; // "pk_...:sk_..."

const res = await fetch(`${apiBase}/threads`, {
  method: "GET",
  headers: {
    "X-API-Key": apiKey,
    // Or: "Authorization": `Bearer ${accessToken}`
  },
});

const data = await res.json();
if (!res.ok) {
  throw new Error(JSON.stringify(data));
}

Errors

Errors return JSON with HTTP 4xx or 5xx. Common shapes:

  • { "detail": "…" }
  • { "detail": { "message": "…", "error_code": "…" } } for limits or billing-related responses.

Check the status code before treating the body as success data.

Interactive reference (Swagger)

When available on the API host:

If those URLs do not load, only /v1 routes may be public — the examples above still apply.

REST API reference