SureContact API Documentation

Introduction

SureContact Public API for external integrations.

This documentation provides all the information you need to work with the SureContact Public API.

Authentication

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

Getting an API Key

  1. Log in to SureContact
  2. Navigate to Profile on Top Bar > API Keys
  3. Click Create API Key
  4. Select the required abilities (read, write, delete)
  5. Copy the key immediately (it won't be shown again)

Rate Limiting

API requests are rate-limited based on your organization's plan. Rate limit information is included in response headers:

  • X-RateLimit-Limit - Maximum requests allowed
  • X-RateLimit-Remaining - Remaining requests in the window
  • X-RateLimit-Reset - Unix timestamp when the limit resets

Authenticating requests

To 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.

Contact Activities

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).

List Activities

GET
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/activities
requires authentication

Get paginated activities for a specific contact. Activities are returned in reverse chronological order (newest first).

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
contact
string
required

The UUID of the contact.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

type
string

Filter by activity type.

Example:
email_sent
from
string

Filter activities from this date (ISO 8601).

Example:
2025-01-01T00:00:00+00:00
to
string

Filter activities until this date (ISO 8601).

Example:
2025-01-31T23:59:59+00:00
days
integer

Filter to activities from the last N days.

Example:
30
per_page
integer

Number of items per page. Default: 15.

Example:
20
Example request:
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"
Example response:
{
    "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
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}

Get Activity

GET
https://api.surecontact.com
/api/v1/public/activities/{activity_uuid}
requires authentication

Get details of a specific activity.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

activity_uuid
string
required
Example:
3970df41-25c8-4100-8a4f-4c2eb7e3346e
activity
string
required

The UUID of the activity.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "Activity not found."
}

Create Activity

POST
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/activities
requires authentication

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).

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
contact
string
required

The UUID of the contact.

Example:
550e8400-e29b-41d4-a716-446655440000

Body Parameters

Example request:
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\"
    }
}"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "type": [
            "Invalid activity type."
        ],
        "description": [
            "Activity description is required."
        ]
    }
}

Contact Management

APIs for managing contacts within a workspace. Contacts are the core entity representing individuals you interact with.

Get paginated contacts

GET
https://api.surecontact.com
/api/v1/public/contacts
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
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"
Example response:

Find Contact by Email

GET
https://api.surecontact.com
/api/v1/public/contacts/email/{email}
requires authentication

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.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

email
string
required

The email address to search for.

Example request:
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"
Example response:

Show a specific contact

GET
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
Example request:
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"
Example response:

Find or Create Contact

POST
https://api.surecontact.com
/api/v1/public/contacts
requires authentication

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:

  • If contact with email exists → Return existing contact (no updates)
  • If contact doesn't exist → Create new contact with provided data

Use this endpoint when you want to ensure a contact exists without overwriting any existing data.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
    }
}"
Example response:
{
    "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"
    }
}
{
    "success": true,
    "is_created": 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-15T10:30:00+00:00",
        "updated_at": "2025-01-15T10:30:00+00:00"
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}
{
    "success": false,
    "message": "The primary_fields.email field is required."
}

Upsert Contact

POST
https://api.surecontact.com
/api/v1/public/contacts/upsert
requires authentication

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:

  • If contact with email exists → Update with provided data, return with is_created: false
  • If contact doesn't exist → Create new contact, return with is_created: true

Use this endpoint when you want to keep contact data synchronized with an external system.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
    }
}"
Example response:
{
    "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"
    }
}
{
    "success": true,
    "is_created": 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-15T10:30:00+00:00",
        "updated_at": "2025-01-15T10:30:00+00:00"
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}
{
    "success": false,
    "message": "The primary_fields.email field is required."
}

Update a contact

PUT
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e

Body Parameters

Example request:
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\"
    }
}"

Update a contact's status

PATCH
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/status
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e

Body Parameters

Example request:
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\"
}"

Attach tags to a contact

POST
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/tags/attach
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e

Body Parameters

Example request:
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\"
    ]
}"

Detach tags from a contact

POST
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/tags/detach
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e

Body Parameters

Example request:
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\"
    ]
}"

Attach lists to a contact

POST
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/lists/attach
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e

Body Parameters

Example request:
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\"
    ]
}"

Detach lists from a contact

POST
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/lists/detach
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e

Body Parameters

Example request:
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\"
    ]
}"

Delete a contact

DELETE
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
Example request:
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"

Contact Notes

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).

List Notes

GET
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/notes
requires authentication

Get paginated notes for a specific contact. Notes are returned in reverse chronological order (newest first).

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
contact
string
required

The UUID of the contact.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

per_page
integer

Number of items per page. Default: 15.

Example:
20
page
integer

Page number.

Example:
1
Example request:
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"
Example response:
{
    "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
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}

Get Note

GET
https://api.surecontact.com
/api/v1/public/notes/{note_uuid}
requires authentication

Get details of a specific note.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

note_uuid
string
required
Example:
77ce6a1f-5faa-4c6f-86ad-18a0963dc58e
note
string
required

The UUID of the note.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "Note not found."
}

Create Note

POST
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/notes
requires authentication

Create a new note for a contact. The note will be attributed to the authenticated user (or API key owner for public API).

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
contact
string
required

The UUID of the contact.

Example:
550e8400-e29b-41d4-a716-446655440000

Body Parameters

Example request:
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.\"
}"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "content": [
            "Note content is required."
        ]
    }
}

Update Note

PUT
https://api.surecontact.com
/api/v1/public/notes/{note_uuid}
requires authentication

Update an existing note. Only the note creator or workspace managers can update notes.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

note_uuid
string
required
Example:
77ce6a1f-5faa-4c6f-86ad-18a0963dc58e
note
string
required

The UUID of the note.

Example:
550e8400-e29b-41d4-a716-446655440000

Body Parameters

Example request:
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.\"
}"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}

Delete Note

DELETE
https://api.surecontact.com
/api/v1/public/notes/{note_uuid}
requires authentication

Soft delete a note. Only the note creator or workspace managers can delete notes.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

note_uuid
string
required
Example:
77ce6a1f-5faa-4c6f-86ad-18a0963dc58e
note
string
required

The UUID of the note.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
[Empty response]
{
    "success": false,
    "message": "This action is unauthorized."
}

Custom Field Management

APIs for managing custom fields within a workspace. Custom fields allow extending contact data with workspace-specific attributes.

Get all custom fields

GET
https://api.surecontact.com
/api/v1/public/custom-fields
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
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"
Example response:

Show a specific custom field

GET
https://api.surecontact.com
/api/v1/public/custom-fields/{customField_uuid}
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

customField_uuid
string
required
Example:
03e98771-493e-4c97-b446-026234075f69
Example request:
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"
Example response:

List Management

APIs for managing lists within a workspace. Lists can be static (manually managed) or dynamic (filter-based).

Get all lists

GET
https://api.surecontact.com
/api/v1/public/lists
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
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"
Example response:

Show a specific list

GET
https://api.surecontact.com
/api/v1/public/lists/{list_uuid}
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

list_uuid
string
required
Example:
52528ff6-afa6-488a-884c-59bd5ff748aa
Example request:
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"
Example response:

Get contacts in a list (with runtime evaluation for dynamic lists)

GET
https://api.surecontact.com
/api/v1/public/lists/{list_uuid}/contacts
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

list_uuid
string
required
Example:
52528ff6-afa6-488a-884c-59bd5ff748aa
Example request:
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"
Example response:

Create a new list

POST
https://api.surecontact.com
/api/v1/public/lists
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\": []
}"

Update a list

PUT
https://api.surecontact.com
/api/v1/public/lists/{list_uuid}
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

list_uuid
string
required
Example:
52528ff6-afa6-488a-884c-59bd5ff748aa

Body Parameters

Example request:
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\": []
}"

Add contacts to a list

POST
https://api.surecontact.com
/api/v1/public/lists/{list_uuid}/contacts/add
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

list_uuid
string
required
Example:
52528ff6-afa6-488a-884c-59bd5ff748aa

Body Parameters

Example request:
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\"
    ]
}"

Remove contacts from a list

POST
https://api.surecontact.com
/api/v1/public/lists/{list_uuid}/contacts/remove
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

list_uuid
string
required
Example:
52528ff6-afa6-488a-884c-59bd5ff748aa

Body Parameters

Example request:
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\"
    ]
}"

Delete a list

DELETE
https://api.surecontact.com
/api/v1/public/lists/{list_uuid}
requires authentication

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

list_uuid
string
required
Example:
52528ff6-afa6-488a-884c-59bd5ff748aa
Example request:
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"

Purchases

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).

List Purchases

GET
https://api.surecontact.com
/api/v1/public/purchases
requires authentication

Get paginated list of purchases for the workspace. Purchases are returned in reverse chronological order (newest first).

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

per_page
integer

Number of items per page (1-100). Default: 20.

Example:
20
page
integer

Page number.

Example:
1
status
string

Filter by purchase status.

Example:
completed
source
string

Filter by purchase source.

Example:
api
contact_uuid
string

Filter by contact UUID.

Example:
550e8400-e29b-41d4-a716-446655440000

Body Parameters

Example request:
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\"
}"
Example response:
{
    "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
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}

Get Purchase

GET
https://api.surecontact.com
/api/v1/public/purchases/{purchase_uuid}
requires authentication

Retrieve a specific purchase by UUID.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

purchase_uuid
string
required
Example:
0db7aba5-50a0-4df6-9bb5-3177e247596b
purchase
string
required

The UUID of the purchase.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
{
    "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]"
        }
    }
}
{
    "success": false,
    "message": "Purchase not found"
}

Get Contact Purchases

GET
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/purchases
requires authentication

Retrieve purchase history for a specific contact, ordered by most recent first.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
contact
string
required

The UUID of the contact.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

limit
integer

Maximum number of purchases to return (1-100). Default: 50.

Example:
50

Body Parameters

Example request:
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
}"
Example response:
{
    "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
    }
}
{
    "success": false,
    "message": "Contact not found"
}

Get Contact Purchase Stats

GET
https://api.surecontact.com
/api/v1/public/contacts/{contact_uuid}/purchase-stats
requires authentication

Retrieve purchase statistics for a specific contact including total purchases, total spent, average order value, and purchase date range.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

contact_uuid
string
required
Example:
00856ffe-26ce-4e9d-9800-b0fb67fb2e0e
contact
string
required

The UUID of the contact.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "Contact not found"
}

Create Purchase

POST
https://api.surecontact.com
/api/v1/public/purchases
requires authentication

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.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
    }
}"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "Contact not found",
    "error_code": "CONTACT_NOT_FOUND"
}
{
    "success": false,
    "message": "Purchase already exists",
    "error_code": "DUPLICATE_PURCHASE"
}
{
    "success": false,
    "message": "The order_id field is required."
}

Cancel Purchase

POST
https://api.surecontact.com
/api/v1/public/purchases/{purchase_uuid}/cancel
requires authentication

Mark a purchase as cancelled. This updates the status to 'cancelled' and records the cancellation timestamp.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

purchase_uuid
string
required
Example:
0db7aba5-50a0-4df6-9bb5-3177e247596b
purchase
string
required

The UUID of the purchase to cancel.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}
{
    "success": false,
    "message": "Purchase not found",
    "error_code": "PURCHASE_NOT_FOUND"
}

Refund Purchase

POST
https://api.surecontact.com
/api/v1/public/purchases/{purchase_uuid}/refund
requires authentication

Mark a purchase as refunded. This updates the status to 'refunded' and records the refund timestamp.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

purchase_uuid
string
required
Example:
0db7aba5-50a0-4df6-9bb5-3177e247596b
purchase
string
required

The UUID of the purchase to refund.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
{
    "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"
    }
}
{
    "success": false,
    "message": "This action is unauthorized."
}
{
    "success": false,
    "message": "Purchase not found",
    "error_code": "PURCHASE_NOT_FOUND"
}

Reports

APIs for advanced analytics and reporting with date filtering, comparison periods, and export functionality.

Get reports overview

GET
https://api.surecontact.com
/api/v1/public/reports/overview
requires authentication

Returns high-level KPIs across contacts, emails, engagement, and revenue with optional comparison to previous period.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Get contact growth report

GET
https://api.surecontact.com
/api/v1/public/reports/contacts/growth
requires authentication

Returns contact growth statistics with optional filtering by tag or list.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Get email sending stats

GET
https://api.surecontact.com
/api/v1/public/reports/emails/sending
requires authentication

Returns email sending statistics including sent, delivered, failed, and bounced counts.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Get email engagement stats

GET
https://api.surecontact.com
/api/v1/public/reports/emails/engagement
requires authentication

Returns email engagement statistics including opens, clicks, and rates.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:
GET
https://api.surecontact.com
/api/v1/public/reports/links/clicks
requires authentication

Returns top clicked links with total and unique click counts.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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
}"
Example response:

Get unsubscribe stats

GET
https://api.surecontact.com
/api/v1/public/reports/unsubscribes
requires authentication

Returns unsubscribe statistics with optional reasons breakdown.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Get bounce stats

GET
https://api.surecontact.com
/api/v1/public/reports/bounces
requires authentication

Returns bounce statistics with hard/soft bounce breakdown.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Get e-commerce revenue stats

GET
https://api.surecontact.com
/api/v1/public/reports/ecommerce/revenue
requires authentication

Returns revenue statistics including total revenue, orders, AOV, and trends.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Get e-commerce product performance

GET
https://api.surecontact.com
/api/v1/public/reports/ecommerce/products
requires authentication

Returns top products by revenue and order count.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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
}"
Example response:

Get campaign performance summary

GET
https://api.surecontact.com
/api/v1/public/reports/campaigns/summary
requires authentication

Returns aggregated metrics across all campaigns.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Export report data

GET
https://api.surecontact.com
/api/v1/public/reports/export
requires authentication

Downloads report data as CSV or Excel file.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:

Tag Management

APIs for managing tags within a workspace. Tags can be applied to contacts for categorization and segmentation purposes.

List Tags

GET
https://api.surecontact.com
/api/v1/public/tags
requires authentication

Get all tags for the current workspace with optional search and sorting.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

search
string

Search tags by name or slug.

Example:
newsletter
sort
string

Sort field. Allowed: name, slug, usage_count, created_at, updated_at.

Example:
name
direction
string

Sort direction: asc or desc. Default: asc.

Example:
asc
per_page
integer

Number of items per page. Default: 15.

Example:
20
Example request:
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"
Example response:
{
    "data": [
        {
            "uuid": "550e8400-e29b-41d4-a716-446655440000",
            "name": "Newsletter",
            "slug": "newsletter",
            "color": "#3B82F6",
            "description": "Subscribed to newsletter",
            "usage_count": 150,
            "created_at": "2025-01-01T00:00:00+00:00"
        }
    ],
    "links": {},
    "meta": {
        "current_page": 1,
        "per_page": 15,
        "total": 10
    }
}

Get Tag

GET
https://api.surecontact.com
/api/v1/public/tags/{tag_uuid}
requires authentication

Get details of a specific tag.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

tag_uuid
string
required
Example:
f838174d-91d8-44e2-bc15-0ae2dc01a4f8
tag
string
required

The UUID of the tag.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
{
    "data": {
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "name": "VIP Customer",
        "slug": "vip-customer",
        "color": "#10B981",
        "description": "High-value customers",
        "usage_count": 25,
        "created_at": "2025-01-01T00:00:00+00:00"
    }
}
{
    "success": false,
    "message": "Resource not found"
}

Get Tag Contacts

GET
https://api.surecontact.com
/api/v1/public/tags/{tag_uuid}/contacts
requires authentication

Get all contacts that have this tag applied.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

tag_uuid
string
required
Example:
f838174d-91d8-44e2-bc15-0ae2dc01a4f8
tag
string
required

The UUID of the tag.

Example:
550e8400-e29b-41d4-a716-446655440000

Query Parameters

per_page
integer

Number of items per page. Default: 15.

Example:
20
Example request:
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"
Example response:
{
    "data": [
        {
            "uuid": "660e8400-e29b-41d4-a716-446655440001",
            "email": "[email protected]",
            "first_name": "John",
            "last_name": "Doe",
            "full_name": "John Doe",
            "phone": "+1234567890",
            "company": "Acme Inc",
            "job_title": "Manager",
            "source": "manual",
            "source_label": "Manual",
            "status": "active",
            "email_status": "valid",
            "created_at": "2025-01-01T00:00:00+00:00"
        }
    ],
    "links": {},
    "meta": {
        "current_page": 1,
        "per_page": 15,
        "total": 50
    }
}
{
    "success": false,
    "message": "Resource not found"
}

Create Tag

POST
https://api.surecontact.com
/api/v1/public/tags
requires authentication

Create a new tag in the current workspace.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
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\"
}"
Example response:
{
    "data": {
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "name": "VIP Customer",
        "slug": "vip-customer",
        "color": "#10B981",
        "description": "High-value customers",
        "usage_count": 0,
        "created_at": "2025-01-15T10:30:00+00:00"
    }
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}

Update Tag

PUT
https://api.surecontact.com
/api/v1/public/tags/{tag_uuid}
requires authentication

Update an existing tag's details.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

tag_uuid
string
required
Example:
f838174d-91d8-44e2-bc15-0ae2dc01a4f8
tag
string
required

The UUID of the tag.

Example:
550e8400-e29b-41d4-a716-446655440000

Body Parameters

Example request:
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\"
}"
Example response:
{
    "data": {
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Premium Customer",
        "slug": "premium-customer",
        "color": "#F59E0B",
        "description": "Premium tier customers",
        "usage_count": 25,
        "created_at": "2025-01-01T00:00:00+00:00"
    }
}

Add Contacts to Tag

POST
https://api.surecontact.com
/api/v1/public/tags/{tag_uuid}/contacts/add
requires authentication

Add multiple contacts to a tag. Contacts that already have the tag will be skipped. Maximum 10,000 contacts per request.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

tag_uuid
string
required
Example:
f838174d-91d8-44e2-bc15-0ae2dc01a4f8
tag
string
required

The UUID of the tag.

Example:
550e8400-e29b-41d4-a716-446655440000

Body Parameters

Example request:
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\"
    ]
}"
Example response:
{
    "data": {
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "name": "VIP Customer",
        "slug": "vip-customer",
        "color": "#10B981",
        "description": "High-value customers",
        "usage_count": 27,
        "created_at": "2025-01-01T00:00:00+00:00"
    }
}
{
    "success": false,
    "message": "Resource not found"
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "contact_uuids": [
            "At least one contact UUID is required."
        ]
    }
}

Remove Contacts from Tag

POST
https://api.surecontact.com
/api/v1/public/tags/{tag_uuid}/contacts/remove
requires authentication

Remove multiple contacts from a tag. Contacts that don't have the tag will be skipped. Maximum 10,000 contacts per request.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

tag_uuid
string
required
Example:
f838174d-91d8-44e2-bc15-0ae2dc01a4f8
tag
string
required

The UUID of the tag.

Example:
550e8400-e29b-41d4-a716-446655440000

Body Parameters

Example request:
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\"
    ]
}"
Example response:
{
    "data": {
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "name": "VIP Customer",
        "slug": "vip-customer",
        "color": "#10B981",
        "description": "High-value customers",
        "usage_count": 23,
        "created_at": "2025-01-01T00:00:00+00:00"
    }
}
{
    "success": false,
    "message": "Resource not found"
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "contact_uuids": [
            "At least one contact UUID is required."
        ]
    }
}

Delete Tag

DELETE
https://api.surecontact.com
/api/v1/public/tags/{tag_uuid}
requires authentication

Permanently delete a tag. This will remove the tag from all contacts.

Headers

X-API-Key
Example:
{YOUR_API_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

tag_uuid
string
required
Example:
f838174d-91d8-44e2-bc15-0ae2dc01a4f8
tag
string
required

The UUID of the tag.

Example:
550e8400-e29b-41d4-a716-446655440000
Example request:
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"
Example response:
[Empty response]
{
    "success": false,
    "message": "Resource not found"
}