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
versionSchema
required
string (versionSchema)

Version Schema.

workspaceId
required
string (workspaceId)

The id of the Workspace the audience exists within.

destinationId
required
string (destinationId)

The Destination id.

enabled
boolean (enabled)

Whether the event emitter should be created in an enabled state.

hasEnabledResync
boolean (hasEnabledResync)

Whether the event emitter should be created with the resync option.

emitEntityContext
string (emitEntityContext)

Whether the event emitter should emit events when the profile changes or when any enriched entity values changes. Only valid for identify events.

eventEmitter
required
any (eventEmitter)

Configuration settings for the event emitter to be created.

subscription
required
any (subscription)

Subscription info to connect the event emitter to a Destination attached to the audience.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

post/spaces/{spaceId}/audiences/{audienceId}/{connectionId}/activations
Request samples
application/vnd.segment.v1alpha+json
{
  • "versionSchema": "v1",
  • "workspaceId": "LF4DPqW",
  • "destinationId": "684758860892086596310ac",
  • "enabled": true,
  • "hasEnabledResync": false,
  • "emitEntityContext": "on_profile_change",
  • "eventEmitter": {
    },
  • "subscription": {
    }
}
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
versionSchema
required
string (versionSchema)

Version Schema.

workspaceId
required
string (workspaceId)

The id of the Workspace the audience exists within.

required
object (destination)

The Destination id.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

post/spaces/{spaceId}/audiences/{audienceId}/destinations
Request samples
application/vnd.segment.v1alpha+json
{
  • "versionSchema": "v1",
  • "workspaceId": "LF4DPqW",
  • "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
query Parameters
workspaceId
required
string (workspaceId)

The workspace id

This parameter exists in alpha.

Example: workspaceId=LF4DPqW
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', 'LF4DPqW')
  )
  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
query Parameters
workspaceId
required
string (workspaceId)

The workspace id

This parameter exists in alpha.

Example: workspaceId=LF4DPqW
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',
      'LF4DPqW'
    )
  )
  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
workspaceId
required
string (workspaceId)

The Workspace id.

enabled
boolean (enabled)

Determines whether an activation is enabled.

eventEmitter
required
any (eventEmitter)

Configuration settings for the event emitter to be created.

subscription
required
any (subscription)

Subscription info to connect the event emitter to a Destination attached to the audience.

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
{
  • "workspaceId": "LF4DPqW",
  • "enabled": false,
  • "eventEmitter": {
    },
  • "subscription": {
    }
}
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
workspaceId
required
string (workspaceId)

The workspace id

This parameter exists in alpha.

Example: workspaceId=LF4DPqW
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', 'LF4DPqW')
  )
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}