curl -X POST "https://api.contactship.ai/v1/contacts/c1d2e3f4-a5b6-7890-cdef-123456789012/tags/tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "x-api-key: your-api-key"
const contactId = 'c1d2e3f4-a5b6-7890-cdef-123456789012';
const tagId = 'tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${contactId}/tags/${tagId}`,
{
method: 'POST',
headers: { 'x-api-key': 'your-api-key' },
}
);
const { data: result } = await response.json();
import requests
contact_id = 'c1d2e3f4-a5b6-7890-cdef-123456789012'
tag_id = 'tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890'
response = requests.post(
f'https://api.contactship.ai/v1/contacts/{contact_id}/tags/{tag_id}',
headers={'x-api-key': 'your-api-key'},
)
print(response.json())
Contactos
Add Tag to Contact
Assign a tag to a contact
POST
/
v1
/
contacts
/
{contactId}
/
tags
/
{tagId}
curl -X POST "https://api.contactship.ai/v1/contacts/c1d2e3f4-a5b6-7890-cdef-123456789012/tags/tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "x-api-key: your-api-key"
const contactId = 'c1d2e3f4-a5b6-7890-cdef-123456789012';
const tagId = 'tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${contactId}/tags/${tagId}`,
{
method: 'POST',
headers: { 'x-api-key': 'your-api-key' },
}
);
const { data: result } = await response.json();
import requests
contact_id = 'c1d2e3f4-a5b6-7890-cdef-123456789012'
tag_id = 'tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890'
response = requests.post(
f'https://api.contactship.ai/v1/contacts/{contact_id}/tags/{tag_id}',
headers={'x-api-key': 'your-api-key'},
)
print(response.json())
Assigns an existing tag to a contact. Use List Tags to get the tag IDs available in your organization.
Headers
Path Parameters
Response
Returns{ "statusCode": 201, "data": contact }. The contact includes its updated tags array.
Error Codes
401 Unauthorized— Invalid or missing API key404 Not Found— Contact or tag not found500 Internal Server Error— Server-side error
Code Examples
curl -X POST "https://api.contactship.ai/v1/contacts/c1d2e3f4-a5b6-7890-cdef-123456789012/tags/tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "x-api-key: your-api-key"
const contactId = 'c1d2e3f4-a5b6-7890-cdef-123456789012';
const tagId = 'tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(
`https://api.contactship.ai/v1/contacts/${contactId}/tags/${tagId}`,
{
method: 'POST',
headers: { 'x-api-key': 'your-api-key' },
}
);
const { data: result } = await response.json();
import requests
contact_id = 'c1d2e3f4-a5b6-7890-cdef-123456789012'
tag_id = 'tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890'
response = requests.post(
f'https://api.contactship.ai/v1/contacts/{contact_id}/tags/{tag_id}',
headers={'x-api-key': 'your-api-key'},
)
print(response.json())
