Activations

Activations are encapsulations that represent the configuration for sending an audience output to a destination.

Note: The Activations API is currently not Publicly Available.

Add Activation to Audience

Creates Activation.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

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

• When called, this endpoint may generate the Activation Created event in the audit trail.

The rate limit for this endpoint is 10 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.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: spa_9aQ1Lj62S4bomZKLF4DPqW
audienceId
required
string [ 1 .. 255 ]
Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS
connectionId
required
string [ 1 .. 255 ]
Example: ii_123456789
Request Body schema: application/vnd.segment.v1alpha+json
required
enabled
boolean (enabled)

Whether the event emitter should be created in an enabled state. Will trigger an audience run if enabled.

performFirstSync
required
boolean (performFirstSync)

Whether to perform the first sync so the activation events are generated on the first audience sync.

activationType
required
string (activationType)

Type of activation trigger.

activationName
required
string (activationName)

Name of the activation.

required
object (personalization)

Configuration settings for the event emitter to be created.

required
object (destinationMapping)

Configuration settings for the mappings to be created.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

post/spaces/{spaceId}/audiences/{audienceId}/destination-connections/{connectionId}/activations
Request samples
application/vnd.segment.v1alpha+json
{
  • "activationType": "Audience Entered",
  • "activationName": "Test Activation",
  • "enabled": true,
  • "performFirstSync": true,
  • "personalization": {
    },
  • "destinationMapping": {}
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Add Destination to Audience

Adds a Destination to an Audience.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

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

• When called, this endpoint may generate the Destination Added into Audience event in the audit trail.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: spa_9aQ1Lj62S4bomZKLF4DPqW
audienceId
required
string [ 1 .. 255 ]
Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS
Request Body schema: application/vnd.segment.v1alpha+json
required
required
object (destination)

The Destination id.

object (idSyncConfiguration)

Identifier sync configuration object.

connectionSettings
any (connectionSettings)

The settings that a Destination requires to create audiences on a third-party platform. These settings are Destination-specific and thus are best defined as unknown.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

post/spaces/{spaceId}/audiences/{audienceId}/destination-connections
Request samples
application/vnd.segment.v1alpha+json
{
  • "destination": {
    }
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Get Activation from Audience

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.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: spa_9aQ1Lj62S4bomZKLF4DPqW
audienceId
required
string [ 1 .. 255 ]
Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS
id
required
string [ 1 .. 255 ]
Example: act_987654321
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces/{spaceId}/audiences/{audienceId}/activations/{id}
Request samples
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)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Remove Activation from Audience

Deletes an Activation.

The rate limit for this endpoint is 10 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.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: spa_9aQ1Lj62S4bomZKLF4DPqW
audienceId
required
string [ 1 .. 255 ]
Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS
id
required
string [ 1 .. 255 ]
Example: act_987654321
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

delete/spaces/{spaceId}/audiences/{audienceId}/activations/{id}
Request samples
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)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Update Activation for Audience

Updates an Activation.

The rate limit for this endpoint is 10 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.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: spa_9aQ1Lj62S4bomZKLF4DPqW
audienceId
required
string [ 1 .. 255 ]
Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS
id
required
string [ 1 .. 255 ]
Example: act_987654321
Request Body schema: application/vnd.segment.v1alpha+json
required
enabled
boolean (enabled)

Determines whether an activation is enabled.

activationName
string (activationName)

Activation name.

object (personalization)

Configuration settings for the event emitter to be created.

object (destinationMapping)

Configuration settings for the mappings to be created.

performFirstSync
boolean (performFirstSync)

Whether to perform the first sync so the activation events are generated on the first audience sync.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

patch/spaces/{spaceId}/audiences/{audienceId}/activations/{id}
Request samples
application/vnd.segment.v1alpha+json
{
  • "activationName": "Updated Test Activation",
  • "enabled": false,
  • "performFirstSync": false,
  • "personalization": {
    },
  • "destinationMapping": {}
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

List Activations from Audience

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.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: spa_9aQ1Lj62S4bomZKLF4DPqW
audienceId
required
string [ 1 .. 255 ]
Example: aud_0ujsszwN8NRY24YaXiTIE2VWDTS
query Parameters
object (PaginationInput)

Optional pagination.

This parameter exists in alpha.

Example: pagination=pagination.count=10
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces/{spaceId}/audiences/{audienceId}/activations
Request samples
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)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}