Skip to main content
POST
/
api
/
v1
/
chat
/
threads
Create Chat Thread
curl --request POST \
  --url http://localhost:8000/api/v1/chat/threads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assistant_type": "onboarding",
  "name": "<string>",
  "description": "<string>",
  "extra_data": {}
}
'
{
  "thread_id": "<string>",
  "is_completed": true,
  "date_added": "2023-11-07T05:31:56Z",
  "date_updated": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "description": "<string>",
  "extra_data": {},
  "google_ads_customer": {
    "id": 123,
    "date_added": "2023-11-07T05:31:56Z",
    "date_updated": "2023-11-07T05:31:56Z",
    "descriptive_name": "<string>",
    "currency_code": "<string>",
    "time_zone": "<string>",
    "status": "<string>",
    "manager": true,
    "is_active": true,
    "is_deleted": false
  },
  "google_ads_login_customer_id": 123,
  "google_business_location": {
    "id": "<string>",
    "title": "<string>",
    "store_code": "<string>",
    "maps_uri": "<string>",
    "storefront_address": {
      "region_code": "<string>",
      "language_code": "<string>",
      "postal_code": "<string>",
      "administrative_area": "<string>",
      "locality": "<string>",
      "sublocality": "<string>",
      "address_lines": [
        "<string>"
      ]
    }
  },
  "assistant": {
    "id": "<string>",
    "assistant_type": "onboarding",
    "date_added": "2023-11-07T05:31:56Z",
    "date_updated": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

company_id
integer
required
customer_id
integer | null
location_id
string | null
login_customer_id
integer | null

Body

application/json

The schema for creating an assistant's chat thread.

assistant_type
enum<string>
required

The Assistant types.

Available options:
onboarding,
general,
market_analysis,
campaign_creation
name
string | null
description
string | null
extra_data
Extra data used to create the chat thread that is later passed to Assistant Functions (tool calls) · object

Response

Successful Response

The schema for an assistant's chat thread.

thread_id
string
required
is_completed
boolean
required
date_added
string<date-time>
required
date_updated
string<date-time>
required
name
string | null
description
string | null
extra_data
Extra data used to create the chat thread that is later passed to Assistant Functions (tool calls) · object
google_ads_customer
GoogleAdsCustomerSchema · object

Schema for GoogleAdsCustomer model.

google_ads_login_customer_id
integer | null
google_business_location
GoogleBusinessLocationSchema · object
assistant
AssistantSchema · object

The schema for an assistant.