Start an import from another system
const url = 'https://api.threadkite.app/v1/imports';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"source":"pipedrive","name":"Pipedrive, everything to October 2026","tag":"From Pipedrive"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.threadkite.app/v1/imports \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "source": "pipedrive", "name": "Pipedrive, everything to October 2026", "tag": "From Pipedrive" }'Starts a batch for bringing contacts, threads and their history in from another system (a CRM, a helpdesk, an old inbox). Send its threads with POST /v1/imports/{id}/threads, a page at a time. Imported history is stored as it happened and starts nothing: no message is sent, and no notification, flow, assignment rule or webhook runs, apart from import.created, thread.imported and import.undone. Every imported thread is tagged (Imported unless you name a tag), and the whole import can be undone.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Any unique value up to 255 characters (a UUID, or the id of the item in your outbox). For 24 hours a retry with the same key and request returns the first response, with Idempotent-Replayed: true, instead of doing it again. Works with an API key or a signed-in session; each has its own keys.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The system you are moving from, as a key. Records are matched on this and their id there, so sending one again (in any import) adds only what is new
Example
pipedriveExample
Pipedrive, everything to October 2026The tag every imported thread gets (made if new); Imported when left out
Example
From PipedriveResponses
Section titled “Responses”A batch of history brought in from another system
object
open takes more threads; undone has had what it made removed
object
Threads already in Threadkite that it added history to
Messages, notes and events stored
Example
{ "source": "pipedrive", "status": "open"}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" } ]}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}