Contacts
Attach a label to a contact
POST
/contacts/{id}/labels
const url = 'https://api-kckit.kirim.chat/v1/contacts/example/labels';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"label_id":"example"}'};
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-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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
label_id
required
string
Example generated
{ "label_id": "example"}Responses
Section titled “ Responses ”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" }}