Activations are encapsulations that represent the configuration for sending an audience output to a destination.
Defines how audience data is sent to a Destination. This step enables the data sync. You must establish a connection (Add Destination to Audience) for this audience before an Activation can be created.
• In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information.
The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
{- "activationType": "Audience Entered",
- "activationName": "Test Activation",
- "enabled": true,
- "performResync": true,
- "personalization": {
- "profile": {
- "properties": [
- "mountain_bikers_2023",
- "game_boy_color_owners"
], - "mapping": {
- "mountain_bikers_2023": "bikers_segment",
- "game_boy_color_owners": "retro_gamers"
}
}, - "entities": [
- {
- "properties": [
- "ID",
- "LAST_ACTIVITY_TIME",
- "BALANCE"
], - "relationshipSlug": "owned-accounts-copy"
}
]
}, - "destinationMapping": {
- "actionId": "action_123",
}
}{- "data": {
- "activation": {
- "id": "act_987654321",
- "enabled": true,
- "workspaceId": "w_123",
- "spaceId": "spa_9aQ1Lj62S4bomZKLF4DPqW",
- "audienceId": "aud_0ujsszwN8NRY24YaXiTIE2VWDTS",
- "connectionId": "ii_123456789",
- "activationType": "Audience Entered",
- "activationName": "Test Activation",
- "personalization": {
- "profile": {
- "properties": [ ]
}
}, - "destinationMapping": {
- "actionId": "action_123"
}, - "performResync": true
}
}
}Establishes a connection between an audience and a Destination. To start syncing data, you must create an Activation for the connection created here.
Note that the Destination must be added to Engage through the Engage Settings page within the App before creating the connection through the API.
• In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information.
The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
{- "destination": {
- "id": "684758860892086596310ac",
- "type": "destination"
}
}{- "data": {
- "connection": {
- "id": "ii_123456789"
}, - "idSyncConfiguration": [ ]
}
}Lists all Destinations from an Audience.
• In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information.
The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap(api.activations.listDestinationsFromAudience('spa_9aQ1Lj62S4bomZKLF4DPqW', 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "connections": [
- {
- "id": "ii_123456789",
- "name": "Test Connection 1",
- "enabled": true,
- "updatedAt": "2023-01-02T00:00:00Z",
- "settings": { },
- "destinationId": "684758860892086596310ac_1",
- "metadata": {
- "id": "1234567890abcdef1234567",
- "name": "Test Destination",
- "slug": "test-destination"
}, - "idSyncConfiguration": [
- {
- "externalId": "email",
- "strategy": "first"
}, - {
- "externalId": "phone",
- "strategy": "all"
}
], - "sourceId": "proj_123",
- "createdAt": "2023-01-01T00:00:00Z"
}, - {
- "id": "ii_another456",
- "name": "Test Connection 2",
- "enabled": false,
- "updatedAt": "2023-01-04T00:00:00Z",
- "settings": { },
- "destinationId": "684758860892086596310ac_2",
- "metadata": {
- "id": "684758860892086596310ad",
- "name": "Another Destination",
- "slug": "another-destination"
}, - "sourceId": "proj_123",
- "createdAt": "2023-01-03T00:00:00Z"
}
], - "pagination": {
- "next": null,
- "current": "first_page"
}
}
}Gets a single Activation by id.
The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.activations.getActivationFromAudience('spa_9aQ1Lj62S4bomZKLF4DPqW', 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS', 'act_987654321') ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "activation": {
- "id": "act_987654321",
- "enabled": true,
- "workspaceId": "w_123",
- "spaceId": "spa_9aQ1Lj62S4bomZKLF4DPqW",
- "audienceId": "aud_0ujsszwN8NRY24YaXiTIE2VWDTS",
- "connectionId": "ii_123456789",
- "activationType": "Audience Entered",
- "activationName": "Test Activation",
- "personalization": {
- "profile": {
- "properties": [ ]
}
}, - "destinationMapping": {
- "actionId": "action_123"
}, - "performResync": true
}
}
}Deletes an Activation.
The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.activations.removeActivationFromAudience('spa_9aQ1Lj62S4bomZKLF4DPqW', 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS', 'act_987654321') ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "status": "SUCCESS"
}
}Updates an Activation.
The rate limit for this endpoint is 50 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
{- "activationName": "Updated Test Activation",
- "enabled": false,
- "performResync": false,
- "personalization": {
- "profile": {
- "properties": [
- "updated_mountain_bikers_2023",
- "updated_game_boy_color_owners"
], - "mapping": {
- "updated_mountain_bikers_2023": "updated_bikers",
- "updated_game_boy_color_owners": "updated_gamers"
}
}, - "entities": [
- {
- "properties": [
- "ID",
- "UPDATED_BALANCE"
], - "relationshipSlug": "owned-accounts-updated"
}
]
}, - "destinationMapping": {
- "actionId": "action_456",
}
}{- "data": {
- "activation": {
- "id": "act_987654321",
- "enabled": false,
- "workspaceId": "w_123",
- "spaceId": "spa_9aQ1Lj62S4bomZKLF4DPqW",
- "audienceId": "aud_0ujsszwN8NRY24YaXiTIE2VWDTS",
- "connectionId": "ii_123456789",
- "activationType": "Audience Entered",
- "activationName": "Updated Test Activation",
- "personalization": {
- "profile": {
- "properties": [ ]
}
}, - "destinationMapping": {
- "actionId": "action_123"
}, - "performResync": false
}
}
}Lists all Activations.
The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap(api.activations.listActivationsFromAudience('spa_9aQ1Lj62S4bomZKLF4DPqW', 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "activations": [
- {
- "id": "act_987654321",
- "enabled": true,
- "workspaceId": "w_123",
- "spaceId": "spa_9aQ1Lj62S4bomZKLF4DPqW",
- "audienceId": "aud_0ujsszwN8NRY24YaXiTIE2VWDTS",
- "connectionId": "ii_123456789",
- "activationType": "Audience Entered",
- "activationName": "Test Activation 1",
- "personalization": {
- "profile": {
- "properties": [ ]
}
}, - "destinationMapping": {
- "actionId": "action_1"
}, - "performResync": true
}, - {
- "id": "act_another123",
- "enabled": false,
- "workspaceId": "w_123",
- "spaceId": "spa_9aQ1Lj62S4bomZKLF4DPqW",
- "audienceId": "aud_0ujsszwN8NRY24YaXiTIE2VWDTS",
- "connectionId": "ii_another123",
- "activationType": "Audience Exited",
- "activationName": "Test Activation 2",
- "personalization": {
- "profile": {
- "properties": [ ]
}
}, - "destinationMapping": {
- "actionId": "action_2"
}, - "performResync": false
}
]
}
}Lists the Destinations that have been reviewed and validated for activation with this audience type.
Use this endpoint to discover the available action ids and the Destination fields that can be mapped before creating an Activation.
Destinations returned with an empty actions array are audience Destinations that are configured through connection settings rather than action mappings, and do not use destinationMapping.
Destinations that are not returned here have not been reviewed for activation and are unsupported. To request a review for an additional Destination, contact your customer success manager.
• In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information.
The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap(api.activations.listSupportedDestinationsFromAudience('spa_9aQ1Lj62S4bomZKLF4DPqW', 'USERS')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "destinations": {
- "facebook-custom-audiences": {
- "name": "Facebook Custom Audiences",
- "slug": "facebook-custom-audiences",
- "actions": [
- {
- "actionId": "action_abc123",
- "actionName": "Sync Audience",
- "settings": [
- {
- "fieldKey": "audienceId",
- "description": "The Facebook Audience ID",
- "required": true
}, - {
- "fieldKey": "adAccountId",
- "description": "The Facebook Ad Account ID",
- "required": true
}
]
}
]
}, - "google-ads": {
- "name": "Google Ads",
- "slug": "google-ads",
- "actions": [
- {
- "actionId": "action_xyz789",
- "actionName": "Update Customer List",
- "settings": [
- {
- "fieldKey": "customerId",
- "description": "The Google Ads Customer ID",
- "required": true
}, - {
- "fieldKey": "listId",
- "description": "The Customer List ID",
- "required": false
}
]
}
]
}
}
}
}Removes a Destination from an Audience. If there are activations associated with the Destination, the request will return a 409 Conflict error.
• In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap( api.activations.removeDestinationFromAudience('spa_9aQ1Lj62S4bomZKLF4DPqW', 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS', 'ii_123456789') ) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "status": "SUCCESS"
}
}Updates a Destination for an Audience.
• In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information.
OK
Resource not found
Validation failure
Too many requests
{- "idSyncConfiguration": [
- {
- "externalId": "user_id",
- "strategy": "first"
}, - {
- "externalId": "email",
- "strategy": "all"
}
]
}{- "data": {
- "destination": {
- "id": "ii_123456789"
}, - "idSyncConfiguration": [
- {
- "externalId": "user_id",
- "strategy": "first"
}, - {
- "externalId": "email",
- "strategy": "all"
}
]
}
}