curl -X GET "https://api.contactship.ai/v1/contacts/c1d2e3f4-a5b6-7890-cdef-123456789012/tags" \
-H "x-api-key: your-api-key"
const contactId = 'c1d2e3f4-a5b6-7890-cdef-123456789012';
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${contactId}/tags`,
{ headers: { 'x-api-key': 'your-api-key' } }
);
const { data: tags } = await response.json();
console.log(`Contact has ${tags.length} tags`);
import requests
contact_id = 'c1d2e3f4-a5b6-7890-cdef-123456789012'
response = requests.get(
f'https://api.contactship.ai/v1/contacts/{contact_id}/tags',
headers={'x-api-key': 'your-api-key'},
)
tags = response.json()["data"]
for tag in tags:
print(f"{tag['name']} ({tag['color']})")
{
"statusCode": 200,
"data": [
{
"id": "c1b2c3d4-e5f6-4890-abcd-ef1234567890",
"name": "hot-lead",
"color": "#FF5733",
"label": "Hot Lead"
},
{
"id": "tag-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "customer",
"color": "#33FF57",
"label": "Customer"
}
]
}
Contactos
Get Contact Tags
Retrieve all tags assigned to a specific contact
GET
/
v1
/
contacts
/
{contactId}
/
tags
curl -X GET "https://api.contactship.ai/v1/contacts/c1d2e3f4-a5b6-7890-cdef-123456789012/tags" \
-H "x-api-key: your-api-key"
const contactId = 'c1d2e3f4-a5b6-7890-cdef-123456789012';
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${contactId}/tags`,
{ headers: { 'x-api-key': 'your-api-key' } }
);
const { data: tags } = await response.json();
console.log(`Contact has ${tags.length} tags`);
import requests
contact_id = 'c1d2e3f4-a5b6-7890-cdef-123456789012'
response = requests.get(
f'https://api.contactship.ai/v1/contacts/{contact_id}/tags',
headers={'x-api-key': 'your-api-key'},
)
tags = response.json()["data"]
for tag in tags:
print(f"{tag['name']} ({tag['color']})")
{
"statusCode": 200,
"data": [
{
"id": "c1b2c3d4-e5f6-4890-abcd-ef1234567890",
"name": "hot-lead",
"color": "#FF5733",
"label": "Hot Lead"
},
{
"id": "tag-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "customer",
"color": "#33FF57",
"label": "Customer"
}
]
}
Returns all tags currently assigned to a contact.
Headers
Path Parameters
Response
The response containsstatusCode and a data array of tag objects. The fields below describe each item in data.
Error Codes
401 Unauthorized— Invalid or missing API key404 Not Found— Contact not found500 Internal Server Error— Server-side error
Code Examples
curl -X GET "https://api.contactship.ai/v1/contacts/c1d2e3f4-a5b6-7890-cdef-123456789012/tags" \
-H "x-api-key: your-api-key"
const contactId = 'c1d2e3f4-a5b6-7890-cdef-123456789012';
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${contactId}/tags`,
{ headers: { 'x-api-key': 'your-api-key' } }
);
const { data: tags } = await response.json();
console.log(`Contact has ${tags.length} tags`);
import requests
contact_id = 'c1d2e3f4-a5b6-7890-cdef-123456789012'
response = requests.get(
f'https://api.contactship.ai/v1/contacts/{contact_id}/tags',
headers={'x-api-key': 'your-api-key'},
)
tags = response.json()["data"]
for tag in tags:
print(f"{tag['name']} ({tag['color']})")
{
"statusCode": 200,
"data": [
{
"id": "c1b2c3d4-e5f6-4890-abcd-ef1234567890",
"name": "hot-lead",
"color": "#FF5733",
"label": "Hot Lead"
},
{
"id": "tag-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "customer",
"color": "#33FF57",
"label": "Customer"
}
]
}
