The Contacts API allows you to manage contacts and contact properties in your SMASHSEND account. You can list contacts, retrieve contact details, create new contacts, update existing ones, and manage custom properties for your contacts.
Lists all contacts for the authenticated workspace.
Authentication
Requires a valid API key with api_user
scope.
Query Parameters
limit
- Maximum number of contacts to return (default: 50, max: 100)
offset
- Number of contacts to skip (default: 0)
Request
curl https://api.smashsend.com/v1/contacts?limit=10&offset=0 \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{ "contacts": [ { "id": "cont_123456789", "email": "contact1@example.com", "name": "John Doe", "createdAt": "2023-03-01T10:00:00Z", "tags": ["customer", "newsletter"], "properties": { "country": "USA", "city": "New York" } }, { "id": "cont_987654321", "email": "contact2@example.com", "name": "Jane Smith", "createdAt": "2023-04-10T14:30:00Z", "tags": ["lead"], "properties": { "country": "Canada", "city": "Toronto" } } ], "pagination": { "total": 235, "limit": 10, "offset": 0 } }
Retrieves details of a specific contact.
Authentication
Requires a valid API key with user
scope.
Path Parameters
contactId
- The ID of the contact to retrieve
Request
curl https://api.smashsend.com/v1/contacts/cont_123456789 \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{ "contact": { "id": "cont_123456789", "email": "contact1@example.com", "name": "John Doe", "createdAt": "2023-03-01T10:00:00Z", "tags": ["customer", "newsletter"], "properties": { "country": "USA", "city": "New York", "company": "Acme Inc.", "title": "CEO" } } }
Creates a new contact.
Authentication
Requires a valid API key with api_user
scope.
Request Body
{ "email": "newcontact@example.com", "name": "New Contact", "tags": ["lead", "website"], "properties": { "country": "France", "city": "Paris", "source": "website" } }
Request
curl -X POST https://api.smashsend.com/v1/contacts \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "email": "newcontact@example.com", "name": "New Contact", "tags": ["lead", "website"], "properties": { "country": "France", "city": "Paris", "source": "website" } }'
Response
{ "contact": { "id": "cont_567890123", "email": "newcontact@example.com", "name": "New Contact", "createdAt": "2023-04-16T15:45:00Z", "tags": ["lead", "website"], "properties": { "country": "France", "city": "Paris", "source": "website" } } }
Updates a contact.
Authentication
Requires a valid API key with user
scope.
Path Parameters
contactId
- The ID of the contact to update
Request Body
{ "name": "Updated Contact Name", "tags": ["customer", "newsletter", "vip"], "properties": { "company": "New Company Inc." } }
Request
curl -X PUT https://api.smashsend.com/v1/contacts/cont_123456789 \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Contact Name", "tags": ["customer", "newsletter", "vip"], "properties": { "company": "New Company Inc." } }'
Response
{ "contact": { "id": "cont_123456789", "email": "contact1@example.com", "name": "Updated Contact Name", "createdAt": "2023-03-01T10:00:00Z", "tags": ["customer", "newsletter", "vip"], "properties": { "country": "USA", "city": "New York", "company": "New Company Inc." } } }
Deletes a contact.
Authentication
Requires a valid API key with user
scope.
Path Parameters
contactId
- The ID of the contact to delete
Request
curl -X DELETE https://api.smashsend.com/v1/contacts/cont_123456789 \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{ "deleted": true }
Lists all contact properties for the authenticated workspace.
Authentication
Requires a valid API key with api_user
scope.
Request
curl https://api.smashsend.com/v1/contact-properties \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{ "properties": [ { "id": "prop_123456789", "name": "country", "label": "Country", "type": "string", "createdAt": "2023-01-15T10:00:00Z" }, { "id": "prop_987654321", "name": "company", "label": "Company", "type": "string", "createdAt": "2023-01-15T10:05:00Z" }, { "id": "prop_567890123", "name": "subscriptionPlan", "label": "Subscription Plan", "type": "string", "createdAt": "2023-01-15T10:10:00Z" } ] }
Creates a new contact property.
Authentication
Requires a valid API key with user
scope.
Request Body
{ "name": "industry", "label": "Industry", "type": "string", "description": "The industry the contact works in" }
Request
curl -X POST https://api.smashsend.com/v1/contact-properties \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "industry", "label": "Industry", "type": "string", "description": "The industry the contact works in" }'
Response
{ "property": { "id": "prop_345678901", "name": "industry", "label": "Industry", "type": "string", "description": "The industry the contact works in", "createdAt": "2023-04-16T15:45:00Z" } }
Updates a contact property.
Authentication
Requires a valid API key with user
scope.
Path Parameters
propertyId
- The ID of the property to update
Request Body
{ "label": "Industry Sector", "description": "The industry sector the contact works in" }
Request
curl -X PUT https://api.smashsend.com/v1/contact-properties/prop_345678901 \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "label": "Industry Sector", "description": "The industry sector the contact works in" }'
Response
{ "property": { "id": "prop_345678901", "name": "industry", "label": "Industry Sector", "type": "string", "description": "The industry sector the contact works in", "createdAt": "2023-04-16T15:45:00Z" } }