Skip to content
Last updated

Create a new conversation thread with optional metadata, assistant configuration, and visibility settings.

POSThttps://api.aitronos.com/v1/threads

Create a new conversation thread with optional metadata, assistant configuration, and visibility settings. All fields are optional, allowing you to create an empty thread and configure it later.

Request Body

metadata object optional

Custom key-value pairs for attaching structured information to the thread. Maximum 16 key-value pairs. Keys must be ≤64 characters, values ≤512 characters.

Example: {"category": "support", "priority": "high", "tags": ["billing", "urgent"]}

assistant_id string optional

ID of the assistant to bind to this thread. When provided, the assistant's configuration will be applied to all responses in this thread.

visible_in_ui boolean optional · Defaults to true

Whether this thread should be visible in the user interface. Requires Bearer token authentication (not API key).

title string optional

Display name for the thread. Maximum 200 characters. If not provided, can be generated later using the Generate AI Name endpoint.

organization_id string required

Organization ID for scoping. All API requests must be scoped to an organization for billing, access control, and resource management. Find your organization ID in Freddy → Settings → Organization.

Returns

Returns a JSON response indicating success or failure.

Bash
curl -X POST "https://api.aitronos.com/v1/threads" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "org_12345"
  }'

Response:

{
  "id": "thrd_abc123",
  "object": "thread",
  "created_at": "2025-11-17T10:00:00Z",
  "updated_at": "2025-11-17T10:00:00Z",
  "last_message_at": "2025-11-17T10:00:00Z",
  "metadata": {},
  "assistant_id": null,
  "organization_id": "org_12345",
  "user_id": "usr_abc123",
  "title": null,
  "status": "inactive",
  "message_count": 0,
  "visible_in_ui": true,
  "last_model_used": null,
  "is_pinned": false,
  "pinned_at": null,
  "space_ids": []
}