Get Behavioral Targeting Segments
Returns a paginated list of behavioral segments available for targeting within a given account. If you feel like you aren't seeing segments that should show up within your account ID, please contact your account manager. Results can be filtered by segment name, data provider, size, and CPM cost.
Endpoint
GET
https://lifeapi.pulsepoint.com/RestApi/v2/meta/behavioralSegments
Query Parameters
| Name | Data Type | Required | Default | Notes |
|---|---|---|---|---|
| accountId | integer | yes | The account ID to retrieve behavioral segments for. Must have access to the account ID provided | |
| search | string | no | Filter segments by name. Case-insensitive, supports partial word matching | |
| accessible_only | boolean | no | true | When true, only returns segments the account has access to |
| providers | string | no | Comma-separated list of data provider IDs to filter by | |
| min_size | integer | no | Minimum segment size (number of users) | |
| max_size | integer | no | Maximum segment size (number of users) | |
| min_cpm | number | no | Minimum CPM cost filter | |
| max_cpm | number | no | Maximum CPM cost filter | |
| sort | ENUM string | no | name | Sort results by field. Valid Values: name, size, cpm, provider |
| order | ENUM string | no | asc | Sort direction. Valid Values: asc, desc |
| limit | integer | no | 50 | Number of results per page. Maximum: 100 |
| cursor | string | no | Opaque pagination cursor. Pass the next_cursor value from a previous response to retrieve the next page | |
| export | boolean | no | false | Return results in export format |
| format | ENUM string | no | json | Export format. Valid Values: json, csv |
Sample Request
GET https://lifeapi.pulsepoint.com/RestApi/v2/meta/behavioralSegments?accountId=559145&search=Auto+Buyers&limit=50
Response Field List
| Name | Data Type | Notes |
|---|---|---|
| success | boolean | Returns true on a successful request |
| message | string | Human-readable result message |
| requestId | string | Unique identifier for the request |
| data | object | Wrapper containing results and pagination |
| data.data | array of objects | List of behavioral segment objects |
| data.data.id | string | The segment ID |
| data.data.name | string | The segment name |
| data.data.provider | object | The data provider associated with this segment |
| data.data.provider.id | string | Data provider ID |
| data.data.provider.name | string | Data provider name |
| data.data.size | integer | Segment size — the number of users in the segment |
| data.data.cpm | number | Cost per thousand impressions for this segment |
| data.data.currency | string | Currency code for the CPM value. Example: USD |
| data.pagination | object | Pagination metadata |
| data.pagination.limit | integer | The page size used for this response |
| data.pagination.total | integer | Total number of segments matching the query |
| data.pagination.has_more | boolean | Whether additional pages of results exist |
| data.pagination.next_cursor | string | Opaque cursor to pass as the cursor query parameter to retrieve the next page |
| data.pagination.next_cursor_url | string | Full URL for the next page of results |
Sample Response
{
"success": true,
"message": "Operation completed successfully",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"data": {
"data": [
{
"id": "12345",
"name": "In-Market: Auto Buyers",
"provider": {
"id": "100",
"name": "Acme Data Provider"
},
"size": 1500000,
"cpm": 0.75,
"currency": "USD"
}
],
"pagination": {
"limit": 50,
"total": 1250,
"has_more": true,
"next_cursor": "eyJpZCI6MTIzNDU2fQ",
"next_cursor_url": "/RestApi/v2/meta/behavioralSegments?accountId=559145&cursor=eyJpZCI6MTIzNDU2fQ&limit=50"
}
}
}Errors
| HTTP Status | Error | Description |
|---|---|---|
| 400 | Validation Error | Missing or invalid query parameters. accountId is required and must be a valid number. Occurs also when filter parameters conflict (e.g., min_size is greater than max_size) |
| 401 | Unauthorized | Invalid or expired access token |
| 403 | Forbidden | You do not have permission to access behavioral segments for this account, or the account does not have access to the requested data provider. Contact your account manager to enable provider access |
| 404 | Not Found | No behavioral segments found matching the specified criteria |
| 422 | Unprocessable Entity | Invalid filter combination |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error |
Updated about 1 month ago
