Threads in a folder
const url = 'https://api.threadkite.app/v1/threads?folder=mine&channel=email&waiting=us&returning=true&sort=recent&item=colour%3ARed%2CBlue%3Bprice%3A..500&limit=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.threadkite.app/v1/threads?folder=mine&channel=email&waiting=us&returning=true&sort=recent&item=colour%3ARed%2CBlue%3Bprice%3A..500&limit=25' \ --header 'Authorization: Bearer <token>'Folders: mine, unassigned, waiting (on us), open, snoozed, done, spam. Only threads in inboxes you can see (yours; every inbox for owners, admins and keys without an inbox limit). Filter by inbox, owner, location, source, tag, channel, derived stage and the items a thread is about (item); q searches names, message text and item words, and matches an exact email, phone number or item identifier. Most recent activity first; pages by cursor.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only threads in this inbox (every inbox you can see when left out)
Only threads in this inbox (every inbox you can see when left out)
Only threads owned by this user
Only threads owned by this user
Threads with a message from this source
Threads with a message from this source
Threads of people who work at this company now
Threads of people who work at this company now
Threads with a message on it
Threads with a message on it
Comma-separated derived stages, e.g. new,contacted
Comma-separated derived stages, e.g. new,contacted
Comma-separated lead scores, e.g. hot,warm
Comma-separated lead scores, e.g. hot,warm
Only threads waiting on this side: us (the team), customer or none
Only threads waiting on this side: us (the team), customer or none
true: only returning customers (threads on their second chapter or later); false: only first chapters
true: only returning customers (threads on their second chapter or later); false: only first chapters
recent: latest activity first; score: Hot first, then Warm, then Cold, then unscored, latest activity first within each; waiting: longest waiting first (by waitingSince), threads not waiting last
recent: latest activity first; score: Hot first, then Warm, then Cold, then unscored, latest activity first within each; waiting: longest waiting first (by waitingSince), threads not waiting last
Item filters (GET /v1/inboxes/list-fields lists them): key:value,value for some values, key:lowest..highest for a range (either end may be left out; price in major units), several joined with ;, values URI-encoded (up to 20 a filter). A thread matches when one item it is about matches every filter
Example
colour:Red,Blue;price:..500Item filters (GET /v1/inboxes/list-fields lists them): key:value,value for some values, key:lowest..highest for a range (either end may be left out; price in major units), several joined with ;, values URI-encoded (up to 20 a filter). A thread matches when one item it is about matches every filter
Search contact names, the names of the companies they work at, message text and the words of the items a thread is about; an exact email, phone number or item identifier matches exactly
Search contact names, the names of the companies they work at, message text and the words of the items a thread is about; an exact email, phone number or item identifier matches exactly
The nextCursor from the previous page
The nextCursor from the previous page
Only threads changed since then (a new message, assigned, closed, tagged): what an app that was away needs to fetch again
Only threads changed since then (a new message, assigned, closed, tagged): what an app that was away needs to fetch again
Responses
Section titled “Responses”object
object
The inbox it is in
object
object
Their picture, uploaded by your team; null when none
object
The company’s picture (uploaded, or its website’s icon); null when none
As the register gives it (active, dissolved, liquidation…); null when not known
The current chapter’s, derived from its activity, never set by hand
The current chapter (the latest)
object
1, 2, 3 within the thread
What started it: first (the thread began), lead (a new lead on a Done thread), period (they wrote long after it closed), staff, api, flow, or migration
Null while open
object
1, 2, 3 within the thread
What started it: first (the thread began), lead (a new lead on a Done thread), period (they wrote long after it closed), staff, api, flow, or migration
Null while open
object
The appointment type id
The time zone it is written in
Who the thread is waiting on
object
Hot, Warm or Cold
Why, up to three, the strongest first
When someone said the contact’s latest messages need no reply (POST /v1/threads/{id}/no-reply-needed); null once they write again or the team replies
When the first reply is due
object
Their picture; null to show their initials
object
object
Archived since it was added: it stays on the thread until taken off, but cannot be added again
Unread for the signed-in person (null for API keys)
Pinned by the signed-in person (POST /v1/threads/{id}/pin): pinned threads come first in the list. Each person pins their own; always false for API keys
Leads in every chapter
Started by “Send a test lead”: kept out of Unassigned, rules, lead counts and webhooks, and can be deleted
What the current chapter is about: catalogue items and free-text lines, main items with their add-ons (parentId), in order
object
object
Where the item came from: manual, csv, api or an integration key
The item’s id in its source
From the attributes
The availability: in_stock, out_of_stock, preorder or backorder for products; an industry pack’s item types have their own
object
Amount in minor units (pence, cents)
ISO 4217
How the price is charged: one_off (once), monthly (every month) or annual (every year)
Image links, main image first
When it was removed from the catalogue (no longer in stock). Removed items stay on the leads and threads that mention them
Advert or product page
Usually sold as an add-on to something else (a warranty, delivery, an onboarding package). Suggestions only
The item types it is usually added to; empty means anything
object
Google/Meta title
Google/Meta description
Product page. Google/Meta link
Main image first. Google/Meta image_link and additional_image_link
Google/Meta price
object
Amount in minor units (pence, cents)
ISO 4217
Google/Meta sale_price
object
Amount in minor units (pence, cents)
ISO 4217
Google/Meta availability
Google/Meta condition
Google/Meta brand
GTIN-8, 12, 13 or 14. Google/Meta gtin
Google/Meta mpn
Your own stock code
Google/Meta google_product_category
Google/Meta product_type
Shared by variants. Google/Meta item_group_id
Google/Meta size
Google/Meta color
Google/Meta material
Google/Meta pattern
Google/Meta custom_label_0
Google/Meta custom_label_1
Google/Meta custom_label_2
Google/Meta custom_label_3
Google/Meta custom_label_4
object
Where the item came from: manual, csv, api or an integration key
The item’s id in its source
From the attributes
The availability: in_stock, out_of_stock, preorder or backorder for products; an industry pack’s item types have their own
object
Amount in minor units (pence, cents)
ISO 4217
How the price is charged: one_off (once), monthly (every month) or annual (every year)
Image links, main image first
When it was removed from the catalogue (no longer in stock). Removed items stay on the leads and threads that mention them
Advert or product page
Usually sold as an add-on to something else (a warranty, delivery, an onboarding package). Suggestions only
The item types it is usually added to; empty means anything
object
Advert title; made from make, model and derivative when left out. Google/Meta title
Google/Meta description
Number plate. Meta vehicle_registration_plate
Google/Meta vin
Google brand, Meta make
Google/Meta model
Full version name
Google/Meta trim
Google/Meta year
First registration date, YYYY-MM-DD
Google mileage, Meta mileage.value and .unit
object
Google condition and certified_pre_owned, Meta state_of_vehicle
Google engine, Meta fuel_type
Meta transmission
Meta drivetrain
Exterior colour. Google color, Meta exterior_color
Meta interior_color
Google/Meta body_style
Google/Meta price
object
Amount in minor units (pence, cents)
ISO 4217
Google/Meta sale_price
object
Amount in minor units (pence, cents)
ISO 4217
object
object
Amount in minor units (pence, cents)
ISO 4217
object
Amount in minor units (pence, cents)
ISO 4217
Main image first. Google image_link/additional_image_link, Meta image[n].url
Advert page. Google link, Meta url
Google/Meta availability
A free-text line’s words
object
Amount in minor units (pence, cents)
ISO 4217
How the price is charged: a free-text line’s own, or a catalogue item’s (as on item). one_off, monthly or annual
The main item this is an add-on to; null for a main item
Order among its siblings
How it got there: named by a lead, added by staff, the API or the assistant
The message that first named it
object
object
Null shows an initial badge
What its row in the inbox list shows, from its inbox’s list layout
object
The item line: the first main item the thread is about. Null when the inbox hides it or the thread is about nothing
object
The item’s reference (an identifier its industry pack names, such as a plate), drawn the way its industry pack draws it; null when the layout leaves it out or the item has none
The item type the reference belongs to; null with no reference
The layout’s other item fields, formatted and joined with ’ · ’
Other main items the thread is about
The item is no longer in the catalogue
The thread details to show under it, in order (read each from the thread’s own fields)
Changes when the thread or its summary changes; poll it to know when to reload
Pass as cursor to get the next page; null on the last page
Example
{ "data": [ { "inbox": { "name": "Leeds Sales", "type": "sales" }, "contact": { "name": "Sarah Turner", "email": "sarah.turner@example.co.uk", "phoneE164": "+447911123456", "avatarUrl": "https://api.threadkite.com/avatars/9b0d….jpg", "company": { "name": "Acme Fleet Services Ltd", "avatarUrl": "https://api.threadkite.com/avatars/6c1f….png", "status": "active" } }, "state": "open", "stage": "new", "chapter": { "number": 2, "startedBy": "first", "outcome": "deal" }, "previousChapter": { "number": 2, "startedBy": "first", "outcome": "deal" }, "nextAppointment": { "type": "consultation", "typeLabel": "Consultation", "timeZone": "Europe/London" }, "waiting": "us", "score": { "band": "hot", "reasons": [ "Asked about finance", "Replies within 5 minutes" ] }, "owner": { "id": "usr_8f2c", "name": "James Patel", "avatarUrl": "https://api.threadkite.app/avatars/0b7c3a52-5d9e-4f3a-9a51-2f1e8c6d4b10.jpg" }, "lastMessage": { "preview": "Is this still available? Could I come in on Saturday?", "kind": "message", "channel": "email" }, "tags": [ { "name": "Finance", "colour": "blue" } ], "leadCount": 2, "items": [ { "item": { "source": "my-dms", "externalId": "SKU-1042", "title": "Oak dining table", "status": "in_stock", "price": { "amountMinor": 1299500, "currency": "GBP" }, "billing": "one_off", "addOnFor": [ "product" ], "attributes": { "title": "Merino jumper", "price": { "amountMinor": 1299500, "currency": "GBP" }, "salePrice": { "amountMinor": 1299500, "currency": "GBP" }, "availability": "in_stock", "condition": "new" }, "type": "product" }, "label": "Custom paint", "price": { "amountMinor": 1299500, "currency": "GBP" }, "billing": "one_off", "quantity": 1, "source": "lead", "addedBy": { "id": "usr_8f2c", "name": "James Patel" } } ], "leadSource": { "name": "Google Ads" }, "display": { "item": { "reference": "FL-1042", "referenceType": "flat", "text": "2 bed flat, Roundhay · £1,150 a month", "more": 1 }, "details": [ "stage", "source", "next_appointment" ] } } ]}object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}Missing or invalid API key
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}The organisation is on the Free plan (code upgrade_required)
object
Stable machine-readable reason
The feature that needs Pro
Where to upgrade or pay, in the web app
Example
{ "statusCode": 402, "code": "upgrade_required", "message": "Connections are part of Pro. Upgrade to connect texts, calls and more.", "feature": "extraSeats", "upgradePath": "/settings/billing"}The key does not have the scope (or the person the permission)
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}Rate limit reached
object
Stable machine-readable reason
Seconds until another request will be accepted
Example
{ "statusCode": 429, "code": "rate_limited", "message": "Too many requests. Each key can make 120 requests a minute; try again in 12 seconds.", "retryAfter": 12}