Skip to content

Set or remove targets for a month

PUT
/v1/targets
curl --request PUT \
--url https://api.threadkite.app/v1/targets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "month": "2026-10", "targets": [ { "scope": "person", "userId": "example", "locationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "leads_handled", "value": 1 } ] }'

Each target is for a person or a location, one metric; a null value removes it. Managers and above.

Media typeapplication/json
object
month
required
string
/^\d{4}-(0[1-9]|1[0-2])$/

Example

2026-10
targets
required
Array<object>
>= 1 items <= 500 items
object
scope
required
string
Allowed values: person location
userId

For scope person

string
nullable >= 1 characters <= 100 characters
locationId

For scope location

string format: uuid
nullable
metric
required
string
Allowed values: leads_handled median_first_reply_minutes appointments sales
value
required

Null removes the target

integer
nullable <= 1000000
Media typeapplication/json
object
month
required
string
elapsed
required

How much of the month has gone, 0 to 1

number
targets
required
Array<object>
object
id
required
string format: uuid
scope
required
string
Allowed values: person location
userId
required

The person (scope person)

string
nullable
locationId
required

The location (scope location)

string format: uuid
nullable
name
required

The person’s or location’s name

string
metric
required
string
Allowed values: leads_handled median_first_reply_minutes appointments sales
label
required
string
value
required

A count, or minutes for the typical first reply

number
actual
required

So far this month, in what you can see (null: nothing to measure yet)

number
nullable
progress
required

How much is done, 0 to 1

number
met
required

At or past the target (at or under it for reply times)

boolean
onTrack
required

On course for the month

boolean
nullable

Example

{
"month": "2026-10",
"targets": [
{
"scope": "person",
"name": "Sam Patel",
"metric": "leads_handled",
"label": "Sales",
"value": 12
}
]
}
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
}