Skip to content
Contacts

Attach a label to a contact

POST
/contacts/{id}/labels
curl --request POST \
--url https://api-kckit.kirim.chat/v1/contacts/example/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "label_id": "example" }'

Idempotent — attaching the same label twice is a no-op. The label and the contact must belong to the same team.

id
required
string
/^ctc_[0-9A-HJKMNP-TV-Z]{26}$/
Media type application/json
object
label_id
required
string
/^lbl_[0-9A-HJKMNP-TV-Z]{26}$/
Example generated
{
"label_id": "example"
}

Attached

Media type application/json
object
data
required
object
contact_id
required
string
label_id
required
string
attached
required
boolean
request_id
required
string
Example
{
"data": {
"attached": true
}
}

Validation failure

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Authentication failure

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Resource not found

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Rate limit exceeded

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}

Internal server error

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}
}