SureContact Public API for external integrations.
This documentation provides all the information you need to work with the SureContact Public API.
All Public API endpoints require an API key. Include it in the request header:
X-API-Key: surecontact_your_api_key_here
Or using the Authorization header with Bearer prefix:
Authorization: Bearer surecontact_your_api_key_here
API requests are rate-limited based on your organization's plan. Rate limit information is included in response headers:
X-RateLimit-Limit - Maximum requests allowedX-RateLimit-Remaining - Remaining requests in the windowX-RateLimit-Reset - Unix timestamp when the limit resetsTo authenticate requests, include a X-API-Key header with the value "{YOUR_API_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can create API keys from the Profile > API Keys section in the dashboard.
APIs for viewing and creating contact activities. Activities represent events and interactions associated with a contact, forming an audit trail of all engagements.
Activity types include: email_sent, email_opened, email_clicked, form_submitted, note_added, note_updated, note_deleted, tag_added, tag_removed, contact_created, contact_updated, list_added, list_removed, custom_field_added, custom_field_updated, custom_field_deleted, purchase_completed, purchase_cancelled, purchase_refunded.
Available via both authenticated API (Sanctum) and Public API (API Key).
Get paginated activities for a specific contact. Activities are returned in reverse chronological order (newest first).
The UUID of the contact.
Filter by activity type.
Filter activities from this date (ISO 8601).
Filter activities until this date (ISO 8601).
Filter to activities from the last N days.
Number of items per page. Default: 15.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/activities?type=email_sent&from=2025-01-01T00%3A00%3A00%2B00%3A00&to=2025-01-31T23%3A59%3A59%2B00%3A00&days=30&per_page=20" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"data": [
{
"uuid": 123,
"type": "email_sent",
"type_label": "Email Sent",
"icon": "mail",
"color": "blue",
"description": "Campaign email sent to contact",
"metadata": {
"campaign_id": "campaign-uuid",
"subject": "Welcome to our newsletter"
},
"contact": {
"uuid": "contact-uuid",
"email": "[email protected]",
"full_name": "John Doe"
},
"created_by": {
"uuid": "user-uuid",
"name": "System",
"email": "[email protected]"
},
"created_at": "2025-01-15T10:30:00+00:00"
}
],
"links": {},
"meta": {
"current_page": 1,
"per_page": 15,
"total": 50
}
}
Get details of a specific activity.
The UUID of the activity.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/activities/3970df41-25c8-4100-8a4f-4c2eb7e3346e" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"type": "form_submitted",
"type_label": "Form Submitted",
"icon": "document-text",
"color": "indigo",
"description": "Contact submitted the newsletter signup form",
"metadata": {
"form_name": "Newsletter Signup",
"page_url": "https://example.com/signup"
},
"contact": {
"uuid": "contact-uuid",
"email": "[email protected]",
"full_name": "John Doe"
},
"created_by": {
"uuid": "user-uuid",
"name": "API Integration",
"email": "[email protected]"
},
"created_at": "2025-01-15T10:30:00+00:00"
}
}
Create a new activity for a contact. This is useful for logging external events or custom integrations. The activity will be attributed to the authenticated user (or API key owner).
The UUID of the contact.
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/activities" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"form_submitted\",
\"description\": \"Customer submitted the contact form on the pricing page.\",
\"metadata\": {
\"form_name\": \"Contact Form\",
\"page_url\": \"https:\\/\\/example.com\\/pricing\"
}
}"
{
"data": {
"uuid": 456,
"type": "form_submitted",
"type_label": "Form Submitted",
"icon": "document-text",
"color": "indigo",
"description": "Customer submitted the contact form on the pricing page.",
"metadata": {
"form_name": "Contact Form",
"page_url": "https://example.com/pricing"
},
"contact": {
"uuid": "contact-uuid",
"email": "[email protected]",
"full_name": "John Doe"
},
"created_by": {
"uuid": "user-uuid",
"name": "API Integration",
"email": "[email protected]"
},
"created_at": "2025-01-15T10:30:00+00:00"
}
}
APIs for managing contacts within a workspace. Contacts are the core entity representing individuals you interact with.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/contacts" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" Look up a contact by their email address. Returns the contact if found, or a 404 response if no contact exists with the given email.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/contacts/email/[email protected]" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"success": true,
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"status": "subscribed",
"created_at": "2025-01-10T10:00:00+00:00",
"updated_at": "2025-01-10T10:00:00+00:00"
}
}
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" Find an existing contact by email or create a new one if not found. This is an idempotent operation - calling multiple times with the same email will return the same contact without modifications.
Behavior:
Use this endpoint when you want to ensure a contact exists without overwriting any existing data.
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"primary_fields\": {
\"email\": \"[email protected]\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"phone\": \"+1234567890\",
\"company\": \"Acme Inc\",
\"job_title\": \"Marketing Manager\",
\"birthdate\": \"1990-01-15\",
\"gender\": \"male\",
\"anniversary\": \"2015-06-20\",
\"prefix\": \"Dr\",
\"suffix\": \"Jr\",
\"source\": \"api\"
},
\"metadata\": {
\"utm_source\": \"google\"
},
\"custom_fields\": {
\"industry\": \"Technology\"
}
}"
{
"success": true,
"is_created": false,
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"status": "subscribed",
"created_at": "2025-01-10T10:00:00+00:00",
"updated_at": "2025-01-10T10:00:00+00:00"
}
}
Create a new contact or update an existing one based on email address. This is an idempotent operation ideal for syncing contact data from external systems.
Behavior:
is_created: falseis_created: trueUse this endpoint when you want to keep contact data synchronized with an external system.
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts/upsert" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"primary_fields\": {
\"email\": \"[email protected]\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"phone\": \"+1234567890\",
\"company\": \"Acme Inc\",
\"job_title\": \"Marketing Manager\",
\"birthdate\": \"1990-01-15\",
\"gender\": \"male\",
\"anniversary\": \"2015-06-20\",
\"prefix\": \"Dr\",
\"suffix\": \"Jr\",
\"source\": \"api\"
},
\"metadata\": {
\"utm_source\": \"google\"
},
\"custom_fields\": {
\"industry\": \"Technology\"
}
}"
{
"success": true,
"is_created": false,
"data": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"status": "subscribed",
"created_at": "2025-01-10T10:00:00+00:00",
"updated_at": "2025-01-15T10:30:00+00:00"
}
}
curl --request PUT \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"primary_fields\": {
\"email\": \"[email protected]\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"phone\": \"+1234567890\",
\"company\": \"Acme Inc\",
\"job_title\": \"Marketing Manager\",
\"birthdate\": \"1990-01-15\",
\"gender\": \"male\",
\"anniversary\": \"2015-06-20\",
\"prefix\": \"Dr\",
\"suffix\": \"Jr\",
\"source\": \"api\"
},
\"metadata\": {
\"utm_source\": \"google\",
\"campaign\": \"spring_sale\"
},
\"custom_fields\": {
\"industry\": \"Technology\",
\"company_size\": \"50-100\"
}
}"
curl --request PATCH \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/status" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status\": \"active\"
}"
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/tags/attach" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tag_uuids\": [
\"550e8400-e29b-41d4-a716-446655440000\"
]
}"
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/tags/detach" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tag_uuids\": [
\"550e8400-e29b-41d4-a716-446655440000\"
]
}"
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/lists/attach" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"list_uuids\": [
\"550e8400-e29b-41d4-a716-446655440000\"
]
}"
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/lists/detach" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"list_uuids\": [
\"550e8400-e29b-41d4-a716-446655440000\"
]
}"
curl --request DELETE \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" APIs for managing notes attached to contacts. Notes allow you to store free-form text information about a contact.
Available via both authenticated API (Sanctum) and Public API (API Key).
Get paginated notes for a specific contact. Notes are returned in reverse chronological order (newest first).
The UUID of the contact.
Number of items per page. Default: 15.
Page number.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/notes?per_page=20&page=1" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"data": [
{
"uuid": "note-uuid-here",
"content": "Called customer to discuss renewal options.",
"created_by": {
"uuid": "user-uuid",
"name": "John Doe",
"email": "[email protected]"
},
"updated_by": null,
"created_at": "2025-01-15T10:30:00+00:00",
"updated_at": "2025-01-15T10:30:00+00:00"
}
],
"links": {},
"meta": {
"current_page": 1,
"per_page": 15,
"total": 5
}
}
Get details of a specific note.
The UUID of the note.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/notes/77ce6a1f-5faa-4c6f-86ad-18a0963dc58e" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"data": {
"uuid": "note-uuid-here",
"content": "Customer requested a callback next week.",
"created_by": {
"uuid": "user-uuid",
"name": "John Doe",
"email": "[email protected]"
},
"updated_by": {
"uuid": "user-uuid-2",
"name": "Jane Smith",
"email": "[email protected]"
},
"created_at": "2025-01-15T10:30:00+00:00",
"updated_at": "2025-01-16T14:00:00+00:00"
}
}
Create a new note for a contact. The note will be attributed to the authenticated user (or API key owner for public API).
The UUID of the contact.
curl --request POST \
"https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/notes" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Renewal Discussion\",
\"content\": \"Customer requested a callback next week to discuss enterprise pricing.\"
}"
{
"data": {
"uuid": "note-uuid-here",
"content": "Customer requested a callback next week to discuss enterprise pricing.",
"created_by": {
"uuid": "user-uuid",
"name": "John Doe",
"email": "[email protected]"
},
"updated_by": null,
"created_at": "2025-01-15T10:30:00+00:00",
"updated_at": "2025-01-15T10:30:00+00:00"
}
}
Update an existing note. Only the note creator or workspace managers can update notes.
The UUID of the note.
curl --request PUT \
"https://api.surecontact.com/api/v1/public/notes/77ce6a1f-5faa-4c6f-86ad-18a0963dc58e" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Follow-up Call Scheduled\",
\"content\": \"Updated: Customer confirmed callback for Monday at 2pm.\"
}"
{
"data": {
"uuid": "note-uuid-here",
"content": "Updated: Customer confirmed callback for Monday at 2pm.",
"created_by": {
"uuid": "user-uuid",
"name": "John Doe",
"email": "[email protected]"
},
"updated_by": {
"uuid": "user-uuid",
"name": "John Doe",
"email": "[email protected]"
},
"created_at": "2025-01-15T10:30:00+00:00",
"updated_at": "2025-01-16T14:00:00+00:00"
}
}
Soft delete a note. Only the note creator or workspace managers can delete notes.
The UUID of the note.
curl --request DELETE \
"https://api.surecontact.com/api/v1/public/notes/77ce6a1f-5faa-4c6f-86ad-18a0963dc58e" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" [Empty response]
APIs for managing custom fields within a workspace. Custom fields allow extending contact data with workspace-specific attributes.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/custom-fields" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" curl --request GET \
--get "https://api.surecontact.com/api/v1/public/custom-fields/03e98771-493e-4c97-b446-026234075f69" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" APIs for managing lists within a workspace. Lists can be static (manually managed) or dynamic (filter-based).
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/lists" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" curl --request GET \
--get "https://api.surecontact.com/api/v1/public/lists/52528ff6-afa6-488a-884c-59bd5ff748aa" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" curl --request GET \
--get "https://api.surecontact.com/api/v1/public/lists/52528ff6-afa6-488a-884c-59bd5ff748aa/contacts" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" curl --request POST \
"https://api.surecontact.com/api/v1/public/lists" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Newsletter Subscribers\",
\"description\": \"Contacts subscribed to our weekly newsletter\",
\"type\": \"static\",
\"filters\": []
}"
curl --request PUT \
"https://api.surecontact.com/api/v1/public/lists/52528ff6-afa6-488a-884c-59bd5ff748aa" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Active Subscribers\",
\"description\": \"Contacts who are actively engaged with our content\",
\"type\": \"static\",
\"filters\": []
}"
curl --request POST \
"https://api.surecontact.com/api/v1/public/lists/52528ff6-afa6-488a-884c-59bd5ff748aa/contacts/add" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contact_uuids\": [
\"550e8400-e29b-41d4-a716-446655440000\"
]
}"
curl --request POST \
"https://api.surecontact.com/api/v1/public/lists/52528ff6-afa6-488a-884c-59bd5ff748aa/contacts/remove" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contact_uuids\": [
\"550e8400-e29b-41d4-a716-446655440000\"
]
}"
curl --request DELETE \
"https://api.surecontact.com/api/v1/public/lists/52528ff6-afa6-488a-884c-59bd5ff748aa" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" APIs for managing e-commerce purchases and order tracking. Purchases represent transactions made by contacts, tracked from various sources like WordPress/WooCommerce, Shopify, or via the API.
Purchase statuses: completed, cancelled, refunded, pending. Purchase sources: wordpress, shopify, api, manual.
Available via both authenticated API (Sanctum) and Public API (API Key).
Get paginated list of purchases for the workspace. Purchases are returned in reverse chronological order (newest first).
Number of items per page (1-100). Default: 20.
Page number.
Filter by purchase status.
Filter by purchase source.
Filter by contact UUID.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/purchases?per_page=20&page=1&status=completed&source=api&contact_uuid=550e8400-e29b-41d4-a716-446655440000" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"per_page\": 1,
\"page\": 22,
\"status\": \"refunded\",
\"source\": \"shopify\",
\"contact_uuid\": \"6b72fe4a-5b40-307c-bc24-f79acf9a1bb9\"
}"
{
"success": true,
"data": [
{
"uuid": "purchase-uuid",
"source": "api",
"source_order_id": "ORD-12345",
"status": "completed",
"total_amount": 99.99,
"currency": "USD",
"products": [
{
"name": "Product A",
"quantity": 1,
"price": 99.99
}
],
"purchased_at": "2025-01-15T10:30:00+00:00",
"contact": {
"uuid": "contact-uuid",
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe"
}
}
],
"meta": {
"current_page": 1,
"last_page": 5,
"per_page": 20,
"total": 100
}
}
Retrieve a specific purchase by UUID.
The UUID of the purchase.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/purchases/0db7aba5-50a0-4df6-9bb5-3177e247596b" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"success": true,
"data": {
"uuid": "purchase-uuid",
"source": "api",
"source_order_id": "ORD-12345",
"status": "completed",
"total_amount": 99.99,
"currency": "USD",
"products": [
{
"name": "Product A",
"quantity": 1,
"price": 99.99
}
],
"metadata": {
"payment_method": "credit_card",
"shipping_amount": 5
},
"purchased_at": "2025-01-15T10:30:00+00:00",
"contact": {
"uuid": "contact-uuid",
"email": "[email protected]"
}
}
}
Retrieve purchase history for a specific contact, ordered by most recent first.
The UUID of the contact.
Maximum number of purchases to return (1-100). Default: 50.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/purchases?limit=50" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"limit\": 1
}"
{
"success": true,
"data": [
{
"uuid": "purchase-uuid",
"source": "api",
"source_order_id": "ORD-12345",
"status": "completed",
"total_amount": 99.99,
"currency": "USD",
"purchased_at": "2025-01-15T10:30:00+00:00"
}
],
"meta": {
"count": 5,
"limit": 50
}
}
Retrieve purchase statistics for a specific contact including total purchases, total spent, average order value, and purchase date range.
The UUID of the contact.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/contacts/00856ffe-26ce-4e9d-9800-b0fb67fb2e0e/purchase-stats" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"success": true,
"data": {
"total_purchases": 5,
"total_spent": 499.95,
"average_order_value": 99.99,
"last_purchase_date": "2025-01-15T10:30:00+00:00",
"first_purchase_date": "2024-06-01T14:00:00+00:00"
}
}
Track a new purchase for a contact. The contact can be identified by UUID or email. If using email and the contact doesn't exist, a new contact will be created automatically.
curl --request POST \
"https://api.surecontact.com/api/v1/public/purchases" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contact_email\": \"[email protected]\",
\"contact_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",
\"order_id\": \"ORD-12345\",
\"purchase_id\": \"PUR-001\",
\"transaction_id\": \"TXN-ABC123\",
\"status\": \"completed\",
\"total_amount\": 99.99,
\"currency\": \"USD\",
\"products\": [
{
\"name\": \"Product A\",
\"quantity\": 1,
\"price\": 99.99
}
],
\"coupon_code\": \"SAVE10\",
\"coupon_amount\": 10,
\"discount\": 10,
\"shipping_amount\": 5,
\"tax_amount\": 8.5,
\"subtotal\": 94.99,
\"payment_method\": \"credit_card\",
\"shipping_method\": \"standard\",
\"customer_note\": \"Please gift wrap\",
\"billing_address\": {
\"street\": \"123 Main St\",
\"city\": \"New York\"
},
\"shipping_address\": {
\"street\": \"123 Main St\",
\"city\": \"New York\"
},
\"purchased_at\": \"2025-01-15T10:30:00Z\",
\"metadata\": {
\"custom_field\": \"value\"
}
}"
{
"success": true,
"message": "Purchase tracked successfully",
"data": {
"purchase_uuid": "purchase-uuid",
"contact_uuid": "contact-uuid",
"contact_email": "[email protected]",
"order_id": "ORD-12345",
"amount": "$99.99 USD",
"status": "completed",
"purchased_at": "2025-01-15T10:30:00+00:00"
}
}
Mark a purchase as cancelled. This updates the status to 'cancelled' and records the cancellation timestamp.
The UUID of the purchase to cancel.
curl --request POST \
"https://api.surecontact.com/api/v1/public/purchases/0db7aba5-50a0-4df6-9bb5-3177e247596b/cancel" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"success": true,
"message": "Purchase cancelled successfully",
"data": {
"purchase_uuid": "purchase-uuid",
"order_id": "ORD-12345",
"status": "cancelled",
"cancelled_at": "2025-01-15T12:00:00+00:00"
}
}
Mark a purchase as refunded. This updates the status to 'refunded' and records the refund timestamp.
The UUID of the purchase to refund.
curl --request POST \
"https://api.surecontact.com/api/v1/public/purchases/0db7aba5-50a0-4df6-9bb5-3177e247596b/refund" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" {
"success": true,
"message": "Purchase refunded successfully",
"data": {
"purchase_uuid": "purchase-uuid",
"order_id": "ORD-12345",
"status": "refunded",
"cancelled_at": "2025-01-15T12:00:00+00:00"
}
}
APIs for advanced analytics and reporting with date filtering, comparison periods, and export functionality.
Returns high-level KPIs across contacts, emails, engagement, and revenue with optional comparison to previous period.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/overview" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"90_days\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"previous_month\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"week\"
}"
Returns contact growth statistics with optional filtering by tag or list.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/contacts/growth" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"yesterday\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"previous_month\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"month\",
\"filter_type\": \"overall\",
\"filter_uuid\": \"a4855dc5-0acb-33c3-b921-f4291f719ca0\"
}"
Returns email sending statistics including sent, delivered, failed, and bounced counts.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/emails/sending" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"12_months\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"custom\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"week\"
}"
Returns email engagement statistics including opens, clicks, and rates.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/emails/engagement" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"yesterday\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"none\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"day\"
}"
Returns top clicked links with total and unique click counts.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/links/clicks" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"90_days\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"previous_year\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"day\",
\"campaign_uuid\": \"6ff8f7f6-1eb3-3525-be4a-3932c805afed\",
\"limit\": 7
}"
Returns unsubscribe statistics with optional reasons breakdown.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/unsubscribes" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"custom\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"previous_month\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"day\"
}"
Returns bounce statistics with hard/soft bounce breakdown.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/bounces" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"90_days\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"none\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"week\",
\"bounce_type\": \"architecto\"
}"
Returns revenue statistics including total revenue, orders, AOV, and trends.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/ecommerce/revenue" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"7_days\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"previous_year\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"day\",
\"source\": \"architecto\"
}"
Returns top products by revenue and order count.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/ecommerce/products" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"12_months\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"none\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"month\",
\"limit\": 1
}"
Returns aggregated metrics across all campaigns.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/campaigns/summary" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"custom\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"previous_period\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"month\",
\"status\": \"architecto\"
}"
Downloads report data as CSV or Excel file.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/reports/export" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date_range\": \"7_days\",
\"start_date\": \"2022-02-15\",
\"end_date\": \"2022-02-15\",
\"compare_with\": \"custom\",
\"compare_start_date\": \"2022-02-15\",
\"compare_end_date\": \"2022-02-15\",
\"group_by\": \"week\",
\"report_type\": \"emails_engagement\",
\"format\": \"xlsx\",
\"filter_type\": \"tag\",
\"filter_uuid\": \"a4855dc5-0acb-33c3-b921-f4291f719ca0\"
}"
APIs for managing tags within a workspace. Tags can be applied to contacts for categorization and segmentation purposes.
Get all tags for the current workspace with optional search and sorting.
Search tags by name or slug.
Sort field. Allowed: name, slug, usage_count, created_at, updated_at.
Sort direction: asc or desc. Default: asc.
Number of items per page. Default: 15.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/tags?search=newsletter&sort=name&direction=asc&per_page=20" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" Get details of a specific tag.
The UUID of the tag.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/tags/f838174d-91d8-44e2-bc15-0ae2dc01a4f8" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" Get all contacts that have this tag applied.
The UUID of the tag.
Number of items per page. Default: 15.
curl --request GET \
--get "https://api.surecontact.com/api/v1/public/tags/f838174d-91d8-44e2-bc15-0ae2dc01a4f8/contacts?per_page=20" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" Create a new tag in the current workspace.
curl --request POST \
"https://api.surecontact.com/api/v1/public/tags" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"VIP Customer\",
\"color\": \"#10B981\",
\"description\": \"High-value customers\",
\"slug\": \"vip-customer\"
}"
Update an existing tag's details.
The UUID of the tag.
curl --request PUT \
"https://api.surecontact.com/api/v1/public/tags/f838174d-91d8-44e2-bc15-0ae2dc01a4f8" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Premium Customer\",
\"color\": \"#F59E0B\",
\"description\": \"Premium tier customers\",
\"slug\": \"premium-customer\"
}"
Add multiple contacts to a tag. Contacts that already have the tag will be skipped. Maximum 10,000 contacts per request.
The UUID of the tag.
curl --request POST \
"https://api.surecontact.com/api/v1/public/tags/f838174d-91d8-44e2-bc15-0ae2dc01a4f8/contacts/add" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contact_uuids\": [
\"660e8400-e29b-41d4-a716-446655440001\",
\"770e8400-e29b-41d4-a716-446655440002\"
]
}"
Remove multiple contacts from a tag. Contacts that don't have the tag will be skipped. Maximum 10,000 contacts per request.
The UUID of the tag.
curl --request POST \
"https://api.surecontact.com/api/v1/public/tags/f838174d-91d8-44e2-bc15-0ae2dc01a4f8/contacts/remove" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"contact_uuids\": [
\"660e8400-e29b-41d4-a716-446655440001\",
\"770e8400-e29b-41d4-a716-446655440002\"
]
}"
Permanently delete a tag. This will remove the tag from all contacts.
The UUID of the tag.
curl --request DELETE \
"https://api.surecontact.com/api/v1/public/tags/f838174d-91d8-44e2-bc15-0ae2dc01a4f8" \
--header "X-API-Key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"