Segment Manager Public API (1.0)

Segment Templates

List available templates

Lists all templates available for segment creation. Returned templated definitions include the required user input which will then be interpolated into the templated attributes and segment definition in order to create the needed resources. See the applyTemplate endpoint for more details on how to.

Authorizations:
httpAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or reuse segment from template

Creates or reuses a segment and the respective attributes that feed it by applying user input to the template with the ID specified in the endpoint's path. The network ID is also required in order for the segment to be associated with the Kevel Native Segments destination for that network.

The response contains the ID of the created or reused segment, along with the template that was used.

Authorizations:
httpAuth
path Parameters
id
required
string

The template ID to use for segment creation.

Request Body schema: application/json
networkId
required
integer <int32>

The network ID to associate the segment with in the respective KevelNativeSegments destination.

advertiserId
required
integer <int64>

The ID of the advertiser creating this segment.

required
object (Map_Json)

Map of user inputs to interpolate into the template. These will be validated in accordance with the expected type attributed to the input in the template's definition.

Responses

Request samples

Content type
application/json
{
  • "networkId": 10000,
  • "advertiserId": 2712478,
  • "userInputs": {
    }
}

Response samples

Content type
application/json
{
  • "segmentId": 0,
  • "template": {
    }
}

List most recent template instantiations

Lists up to the 10 most recent instantiations for the given template, ordered by application time (most recent first). Each entry includes the resulting segment and attributes (with their content-hash IDs and whether they were reused) and the user inputs provided.

Authorizations:
httpAuth
path Parameters
id
required
string

The template ID whose instantiations to list.

Responses

Response samples

Content type
application/json
[
  • {
    }
]