Skip to content

Start an import from another system

POST
/v1/imports
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.

Idempotency-Key
string
<= 255 characters

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.

Media typeapplication/json
object
source
required

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

string
/^[a-z0-9][a-z0-9_.-]{0,49}$/

Example

pipedrive
name
required
string
>= 1 characters <= 200 characters

Example

Pipedrive, everything to October 2026
tag

The tag every imported thread gets (made if new); Imported when left out

string
>= 1 characters <= 50 characters

Example

From Pipedrive
Media typeapplication/json

A batch of history brought in from another system

object
id
required
string format: uuid
source
required
string
name
required
string
status
required

open takes more threads; undone has had what it made removed

string
Allowed values: open undone
tag
required
object
id
required
string format: uuid
name
required
string
threadsCreated
required
integer
>= -9007199254740991 <= 9007199254740991
threadsUpdated
required

Threads already in Threadkite that it added history to

integer
>= -9007199254740991 <= 9007199254740991
contactsCreated
required
integer
>= -9007199254740991 <= 9007199254740991
messagesImported
required

Messages, notes and events stored

integer
>= -9007199254740991 <= 9007199254740991
createdAt
required
string format: date-time
undoneAt
required
string format: date-time
nullable

Example

{
"source": "pipedrive",
"status": "open"
}
Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

Missing or invalid API key

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

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)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
feature
required

The feature that needs Pro

string
nullable
Allowed values: extraSeats connections aiAssistant aiReplies rules fullReports api inboxes bulkMessages videoMessages
upgradePath
required

Where to upgrade or pay, in the web app

string

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)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

Rate limit reached

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
retryAfter
required

Seconds until another request will be accepted

number

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
}