API ReferenceAudience Syncs

Audience Syncs API

Audience syncs activate audiences by sending their members to destinations. Unlike standard syncs (which sync model data), audience syncs are driven by audience membership — they send the set of users who match an audience’s filter criteria to a destination like a CRM, ad platform, or marketing tool.

Endpoints

MethodPathDescription
GET/api/v1/workspaces/{id}/audience-syncsList all audience syncs
POST/api/v1/workspaces/{id}/audience-syncsCreate an audience sync
GET/api/v1/workspaces/{id}/audience-syncs/{syncId}Get an audience sync
PUT/api/v1/workspaces/{id}/audience-syncs/{syncId}Update an audience sync
DELETE/api/v1/workspaces/{id}/audience-syncs/{syncId}Delete an audience sync
POST/api/v1/workspaces/{id}/audience-syncs/{syncId}/triggerTrigger a sync run
GET/api/v1/workspaces/{id}/audience-syncs/{syncId}/runsList sync runs
GET/api/v1/workspaces/{id}/audience-syncs/{syncId}/runs/{runId}Get a sync run

List Audience Syncs

GET /api/v1/workspaces/{id}/audience-syncs

Returns all audience syncs in the workspace.

Response

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "workspace_id": "660e8400-e29b-41d4-a716-446655440000",
    "audience_id": "770e8400-e29b-41d4-a716-446655440000",
    "destination_id": "880e8400-e29b-41d4-a716-446655440000",
    "name": "High-Value Customers to Google Ads",
    "description": "Sync high-value segment to Google Ads customer match",
    "field_mapping": [
      {"source_column": "email", "destination_field": "hashedEmail"},
      {"source_column": "phone", "destination_field": "hashedPhoneNumber"}
    ],
    "sync_mode": "mirror",
    "schedule": "0 */4 * * *",
    "config": {},
    "status": "active",
    "status_error": "",
    "created_by": "990e8400-e29b-41d4-a716-446655440000",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "last_synced_at": "2024-01-15T16:00:00Z",
    "last_run_id": "aae8400-e29b-41d4-a716-446655440000",
    "split_group_id": null
  }
]

Example

curl -X GET https://your-instance.signalsmith.io/api/v1/workspaces/{id}/audience-syncs \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>"

Create Audience Sync

POST /api/v1/workspaces/{id}/audience-syncs

Creates a new audience sync to activate an audience to a destination.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name
descriptionstringNoDescription
audience_idstring (UUID)YesAudience to sync
destination_idstring (UUID)YesTarget destination
field_mappingarrayYesColumn-to-field mappings
sync_modestringYesadd, remove, mirror, or upsert
schedulestringNoCron expression for scheduling
configobjectNoAdditional sync-specific configuration
split_group_idstring (UUID)NoA/B split group to sync (instead of the full audience)

Audience Sync Modes

ModeDescription
addOnly add new audience members to the destination
removeOnly remove members who exited the audience
mirrorAdd new members and remove exited members to keep destination in sync
upsertAdd new members and update existing records

Example

curl -X POST https://your-instance.signalsmith.io/api/v1/workspaces/{id}/audience-syncs \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "High-Value Customers to Google Ads",
    "audience_id": "770e8400-e29b-41d4-a716-446655440000",
    "destination_id": "880e8400-e29b-41d4-a716-446655440000",
    "field_mapping": [
      {"source_column": "email", "destination_field": "hashedEmail"}
    ],
    "sync_mode": "mirror",
    "schedule": "0 */4 * * *"
  }'

Get Audience Sync

GET /api/v1/workspaces/{id}/audience-syncs/{syncId}

Returns a single audience sync by ID.


Update Audience Sync

PUT /api/v1/workspaces/{id}/audience-syncs/{syncId}

Updates an existing audience sync.

Request Body

Same fields as create. Only include fields you want to change.


Delete Audience Sync

DELETE /api/v1/workspaces/{id}/audience-syncs/{syncId}

Deletes an audience sync.

Response

{
  "status": "deleted"
}

Trigger Sync Run

POST /api/v1/workspaces/{id}/audience-syncs/{syncId}/trigger

Manually triggers an audience sync run.

Response

Returns the created sync run object with status 201 Created.


List Sync Runs

GET /api/v1/workspaces/{id}/audience-syncs/{syncId}/runs

Returns the execution history for an audience sync.


Get Sync Run

GET /api/v1/workspaces/{id}/audience-syncs/{syncId}/runs/{runId}

Returns details of a specific audience sync run.


Audience Sync Object

FieldTypeDescription
idstring (UUID)Unique identifier
workspace_idstring (UUID)Owning workspace
audience_idstring (UUID)Source audience
destination_idstring (UUID)Target destination
namestringDisplay name
descriptionstringDescription
field_mappingarrayColumn-to-field mappings
sync_modestringadd, remove, mirror, or upsert
schedulestringCron expression
configobjectAdditional configuration
statusstringdraft, active, paused, or error
status_errorstringError message when status is error
created_bystring (UUID)Account that created the sync
created_atstring (ISO 8601)Creation timestamp
updated_atstring (ISO 8601)Last update timestamp
last_synced_atstring (ISO 8601) or nullLast successful sync time
last_run_idstring (UUID) or nullID of the most recent run
split_group_idstring (UUID) or nullA/B split group (if applicable)