Skip to main content
POST
/
api
/
v1
/
threads
Create thread
curl --request POST \
  --url https://itz.am/api/v1/threads \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My Thread",
  "lookupKeys": [
    "user-123",
    "platform-web-app"
  ],
  "contextSlugs": [
    "special-docs",
    "admin-files"
  ],
  "workflowSlug": "my_great_workflow"
}'
{
  "id": "thread_1234567890",
  "name": "My Thread",
  "lookupKeys": [
    "user-123",
    "platform-web-app"
  ],
  "contextSlugs": [
    "special-docs",
    "admin-files"
  ],
  "createdAt": "2021-01-01T00:00:00.000Z",
  "updatedAt": "2021-01-01T00:00:00.000Z"
}

Authorizations

Api-Key
string
header
required

The API key to use for authentication

Body

application/json
workflowSlug
string
required

The slug of the workflow this thread belongs to

Minimum length: 1
Example:

"my_great_workflow"

name
string

The name of the thread (optional, will auto-generate if not provided)

Example:

"My Thread"

lookupKeys
string[]

Optional lookup keys for finding the thread later

Example:
["user-123", "platform-web-app"]
contextSlugs
string[]

Optional context slugs to append the context to the thread

Example:
["special-docs", "admin-files"]

Response

Successfully created thread

id
string
required

The ID of the created thread

Example:

"thread_1234567890"

name
string
required

The name of the thread

Example:

"My Thread"

lookupKeys
string[] | null
required

The lookup keys of the thread

Example:
["user-123", "platform-web-app"]
contextSlugs
string[] | null
required

The context slugs of the thread

Example:
["special-docs", "admin-files"]
createdAt
string
required

The creation date of the thread

Example:

"2021-01-01T00:00:00.000Z"

updatedAt
string
required

The last update date of the thread

Example:

"2021-01-01T00:00:00.000Z"