Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
Keyword Insights
GET insights/keywords/search
Given a group of keywords, get the associated Tweet volume as well as a set of 30 related keywords. The Tweet volume corresponds to the input keywords only, not the related keywords. A maximum time range (end_time - start_time) of 7 days is allowed.
Please note that results are scoped by a single geo (country).
Resource URL
https://ads-api.x.com/12/insights/keywords/search
Parameters
| Name | Description |
|---|---|
| granularity required | Specifies the granularity of the data returned for the time range denoted by start_time and end_time. For instance, when set to HOUR, you will be presented with a datapoint for each hour between start_time and end_time. request.Type: enum Possible values: DAY, HOUR |
| keywords required | A comma-separated string of keywords to narrow search by. All keywords are OR’ed with one another. Note: A maximum of 10 keywords ( keywords and negative_keywords combined) may be used.Type: string Example: developers |
| start_time required | Scopes the retrieved data to data collected in the window of time between start_time and end_time. Expressed in ISO 8601.Type: string Example: 2017-07-10T00:00:00Z |
| end_time optional | Scopes the retrieved data to data collected in the window of time between start_time and end_time. Expressed in ISO 8601.Note: Defaults to the current time. Type: string Example: 2017-07-11T00:00:00Z |
| location optional | A targeting value you would get from the GET targeting_criteria/locations endpoint to narrow results in terms of where the user of the account is located. Note that at present only country level locations are supported. Type: string Example: 0ce8b9a7b2742f7e |
| negative_keywords optional | A comma-separated string of keywords to exclude. All negative keywords are OR’ed with one another. Note: A maximum of 10 keywords ( keywords and negative_keywords combined) may be used.Type: string Example: rain |
Tailored Audience Permissions
GET accounts/:account_id/tailored_audiences/:tailored_audience_id/permissions
Retrieve details for some or all permissions associated with the specified tailored audience. Resource URLhttps://ads-api.x.com/5/accounts/:account_id/tailored_audiences/:tailored_audience_id/permissions
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| tailored_audience_id required | A reference to the tailored audience you are operating with in the request. Type: string Example: 1nmth |
| count optional | Specifies the number of records to try and retrieve per distinct request. Type: int Default: 200 Min, Max: 1, 1000 |
| cursor optional | Specifies a cursor to get the next page of results. See Pagination for more information. Type: string Example: 8x7v00oow |
| granted_account_ids optional | Scope the response to just the desired accounts by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided. Type: string Example: 18ce54aymz3 |
| sort_by optional | Sorts by supported attribute in ascending or descending order. See Sorting for more information. Type: string Example: created_at-asc |
| tailored_audience_permission_ids optional | Scope the response to just the desired tailored audience permissions by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided. Type: string Example: ri |
| with_total_count optional | Include the total_count response attribute.Note: This parameter and cursor are exclusive.Note: Requests which include total_count will have lower rate limits, currently set at 200 per 15 minutes.Type: boolean Default: false Possible values: true, false |
GET https://ads-api.x.com/5/accounts/18ce54d4x5t/tailored_audiences/1nmth/permissions
Example Response
POST accounts/:account_id/tailored_audiences/:tailored_audience_id/permissions
Create a new permission object allowing the specified audience to be shared with a given account. Note: Creating or modifying permissions for a tailored audience requires that the audience be owned by the account attempting to modify permissions. You can check the ownership of a tailored audience by looking at theis_owner response attribute in the response for a given audience.
Note: Audiences can only be shared between ads accounts under the same business or if the ads account that owns the audience has the SHARE_AUDIENCE_OUTSIDE_BUSINESS account feature.
Resource URL
https://ads-api.x.com/5/accounts/:account_id/tailored_audiences/:tailored_audience_id/permissions
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| granted_account_id required | The account you wish to grant the tailored audience permissions for. Type: string Example: 18ce54aymz3 |
| permission_level required | The type of access to the tailored audience that the granted_account_id should have.Type: enum Possible values: READ_ONLY, READ_WRITE |
| tailored_audience_id required | A reference to the tailored audience you are operating with in the request. Type: string Example: 2906h |
POST https://ads-api.x.com/5/accounts/18ce54d4x5t/tailored_audiences/2906h/permissions?granted_account_id=18ce54aymz3&permission_level=READ_ONLY
Example Response
DELETE accounts/:account_id/tailored_audiences/:tailored_audience_id/permissions/:tailored_audience_permission_id
Revoke the specified Tailored Audience sharing permission. Note: Creating or modifying permissions for a tailored audience requires that the audience be owned by the account attempting to modify permissions. You can check the ownership of a tailored audience by looking at theis_owner response attribute in the response for a given audience.
When revoked, we guarantee that the granted account (granted_account_id) will not be able to target the audience in future campaigns. Existing campaigns will continue to run with the shared audiences; campaigns do not stop and the audience does not get removed from the campaign. It is not possible to copy this campaign after the audience sharing permission has been revoked.
Resource URL
https://ads-api.x.com/5/accounts/:account_id/tailored_audiences/:tailored_audience_id/permissions/:tailored_audience_permission_id
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| tailored_audience_id required | A reference to the tailored audience you are operating with in the request. Type: string Example: 1nmth |
| tailored_audience_permission_id required | A reference to the tailored audience permission you are operating with in the request. Type: string Example: ri |
DELETE https://ads-api.x.com/5/accounts/18ce54d4x5t/tailored_audiences/1nmth/permissions/ri
Example Response
Targeted Audiences
GET accounts/:account_id/custom_audiences/:custom_audience_id/targeted
Retrieve a list of active or all line items and campaigns that target a givencustom_audience_id
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| custom_audience_id required | A reference to the custom audience you are operating with in the request. Type: string Example: 2906h |
| with_active optional | When false, includes line items that have servable=false statusType: boolean Default: true Possible values: true, false |
| cursor optional | Specifies a cursor to get the next page of results. See Pagination for more information. Type: string Example: 8x7v00oow |
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences/2906h/targeted
Example Response
Custom Audiences Users
POST accounts/:account_id/custom_audiences/:custom_audience_id/users
This endpoint will allow partners to add, update and remove users from a givencustom_audience_id. The endpoint will also accept multiple user identifier types per user as well.
All data being provided in the users field of the request except partner_user_id must be hashed using SHA256 and normalized.
Batch Requests
- The current maximum batch size is
2500for this endpoint. The batch size is determined by the number of operations (Update/Delete) per request. For example, over 2500 operation objects ({"operation_type": "Update/Delete", [..] }) in one array result in an error. - The max request POST body size this endpoint can accept is
5,000,000bytes. - The rate limits for this endpoint are 1500 per 1 minute window
- All parameters are sent in the request body and a
Content-Typeofapplication/jsonis required. - Batch requests fail or succeed together as a group and all API responses for both error and success preserve the item order of the initial request.
success_count and a total_count. These values must always be equal, and they are a count of the number of records in the request that have been processed by the backend. A situation where the number of records sent in the request body is not equal the success_count and total_count should be treated as an error condition, requiring a retry.
Batch Errors
- Request-level errors (eg. max batch size exceeded) are shown in the response under the
errorsobject. - Item-level errors (eg. missing required parameters) are show in the response under the
operation_errorsobject. - The index of the error in the
operation_errorsrefers to the index in the input item, with the corresponding error message
Resource URL
https://ads-api.x.com/12/accounts/:account_id/custom_audiences/:custom_audience_id/users
Parameters
| Name | Description |
|---|---|
| operation_type required | The per users group operation type being performed.Type: enum Possible values: Update, Delete |
| params required | A JSON object containing the users array, the effective_at and expires_at timestamps.Type: JSON |
| users required | An array of JSON objects containing all params for an individual user. Type: JSON |
| effective_at optional | The UTC time at which the custom audience association(s) should take effect. Expressed in ISO 8601. Defaults to the current date and time. Type: string Example: 2017-07-05T07:00:00Z |
| expires_at optional | The UTC time at which the custom audience association(s) should expire. The specified time must be later than the value of effective_at. Expressed in ISO 8601. Defaults to 13 months from the request timestamp.Type: string Example: 2017-07-05T07:00:00Z |
users object, each element of this object is documented below:
| Name | Description |
|---|---|
| email optional | Email address(es) for the user. Type: Array[String] |
| device_id optional | IDFA/AdID/Android ID Type: Array[String] |
| handle optional | The @handle(s) belonging to the user Type: Array[String] |
| twitter_id optional | The X ID belonging to the user Type: Array[String] |
| phone_number optional | Phone number(s) for the user Type: Array[String] |
| partner_user_id optional | The user’s ID in the partners’ system. Type: Array[String] |
Example Request
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences/1nmth/users
Example Response
Custom Audience Permissions
GET accounts/:account_id/custom_audiences/:custom_audience_id/permissions
Retrieve details for some or all permissions associated with the specified custom audience. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/custom_audiences/:custom_audience_id/permissions
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| custom_audience_id required | A reference to the custom audience you are operating with in the request. Type: string Example: 1nmth |
| count optional | Specifies the number of records to try and retrieve per distinct request. Type: int Default: 200 Min, Max: 1, 1000 |
| cursor optional | Specifies a cursor to get the next page of results. See Pagination for more information. Type: string Example: 8x7v00oow |
| granted_account_ids optional | Scope the response to just the desired accounts by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided. Type: string Example: 18ce54aymz3 |
| sort_by optional | Sorts by supported attribute in ascending or descending order. See Sorting for more information. Type: string Example: created_at-asc |
| custom_audience_permission_ids optional | Scope the response to just the desired custom audience permissions by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided. Type: string Example: ri |
| with_total_count optional | Include the total_count response attribute.Note: This parameter and cursor are exclusive.Note: Requests which include total_count will have lower rate limits, currently set at 200 per 15 minutes.Type: boolean Default: false Possible values: true, false |
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences/1nmth/permissions
Example Response
POST accounts/:account_id/custom_audiences/:custom_audience_id/permissions
Create a new permission object allowing the specified audience to be shared with a given account. Note: Creating or modifying permissions for a custom audience requires that the audience be owned by the account attempting to modify permissions. You can check the ownership of a custom audience by looking at theis_owner response attribute in the response for a given audience.
Note: Audiences can only be shared between ads accounts under the same business or if the ads account that owns the audience has the SHARE_AUDIENCE_OUTSIDE_BUSINESS account feature.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/custom_audiences/:custom_audience_id/permissions
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| granted_account_id required | The account you wish to grant the custom audience permissions for. Type: string Example: 18ce54aymz3 |
| permission_level required | The type of access to the custom audience that the granted_account_id should have.Type: enum Possible values: READ_ONLY, READ_WRITE |
| custom_audience_id required | A reference to the custom audience you are operating with in the request. Type: string Example: 2906h |
DELETE accounts/:account_id/custom_audiences/:custom_audience_id/permissions/:custom_audience_permission_id
Revoke the specified Custom Audience sharing permission. Note: Creating or modifying permissions for a custom audience requires that the audience be owned by the account attempting to modify permissions. You can check the ownership of a custom audience by looking at theis_owner response attribute in the response for a given audience.
When revoked, we guarantee that the granted account (granted_account_id) will not be able to target the audience in future campaigns. Existing campaigns will continue to run with the shared audiences; campaigns do not stop and the audience does not get removed from the campaign. It is not possible to copy this campaign after the audience sharing permission has been revoked.
Resource URL
https://ads-api.x.com/12/accounts/:account_id/custom_audiences/:custom_audience_id/permissions/:custom_audience_permission_id
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| custom_audience_id required | A reference to the custom audience you are operating with in the request. Type: string Example: 1nmth |
| custom_audience_permission_id required | A reference to the custom audience permission you are operating with in the request. Type: string Example: ri |
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences/1nmth/permissions/ri
Example Response
Custom Audiences
GET accounts/:account_id/custom_audiences
Retrieve details for some or all Custom Audiences associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/custom_audiences
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| count optional | Specifies the number of records to try and retrieve per distinct request. Type: int Default: 200 Min, Max: 1, 1000 |
| cursor optional | Specifies a cursor to get the next page of results. See Pagination for more information. Type: string Example: 8x7v00oow |
| permission_scope optional | Allows filtering the response to lists you own or lists that have been shared with you. By default, without specifying this parameter you will only see audiences you own. Type: enum Default: OWNER Possible values: OWNER, SHARED |
| q optional | An optional query to scope resource by name.Note: This performs case-insensitive prefix matching. Type: string Min, Max length: 1, 255 |
| sort_by optional | Sorts by supported attribute in ascending or descending order. See Sorting for more information. Type: string Example: created_at-asc |
| custom_audience_ids optional | Scope the response to just the desired custom audiences by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided. Type: string Example: 1nmth |
| with_deleted optional | Include deleted results in your request. Type: boolean Default: false Possible values: true, false |
| with_total_count optional | Include the total_count response attribute.Note: This parameter and cursor are exclusive.Note: Requests which include total_count will have lower rate limits, currently set at 200 per 15 minutes.Type: boolean Default: false Possible values: true, false |
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences?custom_audience_ids=1nmth
Example Response
GET accounts/:account_id/custom_audiences/:custom_audience_id
Retrieve specific Custom Audiences associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/custom_audiences/:custom_audience_id
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| custom_audience_id required | A reference to the custom audience you are operating with in the request. Type: string Example: 2906h |
| with_deleted optional | Include deleted results in your request. Type: boolean Default: false Possible values: true, false |
GET https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences/2906h
Example Response
POST accounts/:account_id/custom_audiences
Create a new placeholder Custom Audience associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/custom_audiences
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| name required | The display name for this audience. Unique name value must be used. Failure to do so will result in an error. Type: string Example: ads api users |
| description optional | A description for this audience. Type: string Example: Collection of all users of the Ads API |
POST https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences?name=developers
Example Response
PUT accounts/:account_id/custom_audiences/:custom_audience_id
Update the specfic Custom Audience associated with the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/custom_audiences/:custom_audience_id
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| custom_audience_id required | A reference to the Custom Audience you are operating with in the request Type: string Example: 2906h |
| name optional | The display name for this audience. Unique name value must be used. Failure to do so will result in an error. Type: string Example: ads api users |
| description optional | A description for this audience. Type: string Example: Collection of all users of the Ads API |
PUT https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences/2906h?name=developers_changed
Example Response
POST batch/accounts/:account_id/custom_audiences
Allows for batch creation of Custom Audiences. See the Custom Audiences Overview page for information on audiences. Note: This batch endpoint is currently in closed beta and available to select advertisers. During this beta period, only Flexible Audiences based on mobile custom audiences can be created. Batch Requests- The current maximum batch size is 10.
- All parameters are sent in the request body and a
Content-Typeofapplication/jsonis required. - Batch requests fail or succeed together as a group and all API responses for both error and success preserve the item order of the initial request.
- Request-level errors (eg. max batch size exceeded) are shown in the response under the
errorsobject. - Item-level errors (eg. missing required parameter) are shown in the response under the
operation_errorsobject.
- Flexible Audiences are immutable once created.
- Custom Audiences are passed in a tree structure with boolean logic combinations to create Flexible Audiences
- A maximum of 10 Custom Audiences leaf nodes can be used to create a Flexible Audience.
https://ads-api.x.com/12/batch/accounts/:account_id/custom_audiences
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| audience_type required | The type of audience to create. Type: enum Possible values: FLEXIBLE, MOBILE_AUDIENCE |
| child_segments required | An array containing objects which define the subset of a Custom Audience’s members that you would like to target. Each object should contain a custom_audience_id, frequency, frequency_comparator, lookback_window, negate, and, in some cases, additional child_segments.Type: array |
| name required | The display name for the audience. Unique name value must be used. Failure to do so will result in an error. Type: string Example: my_flexible_audience_name |
| operation_type required | The per item operation type being performed. Type: enum Possible values: Create, Update, Delete |
| boolean_operator sometimes required | The logical relationship between the child segments in its parent (containing) object. Required if child_segments is non-empty for the parent object. Type: enum Possible values: AND, OR |
| lookback_window sometimes required | An integer value specifying the range of days within which the user has taken the specific action and qualified for the given custom audience. Type: int Possible values: 1, 7, 14, 30 |
| segments sometimes required | An object containing a boolean_operator and child_segments which define the subset of a Custom Audience’s members that you would like to target.Type: object |
| custom_audience_id sometimes required | The id of the custom audience to use as a child segment. Type: string Example: tyfo |
| frequency optional | An integer value specifying the frequency within the lookback window that the user has taken the specific action and qualified for the given custom audience. Type: int Default value: 1 |
| frequency_comparator optional | The comparator to the frequency passed in the request.Note: In the values below, GTE refers to greater than or equal, LT to less than, and so on.Type: string Possible values: NUM_GTE, NUM_GT, NUM_EQ, NUM_LTE, NUM_LT Default value: NUM_GTE |
| negate optional | Negates the segment and thus is excluded in the combination. Type: boolean Default value: true Possible values: true, false |
POST https://ads-api.x.com/12/batch/accounts/18ce54d4x5t/custom_audiences
DELETE accounts/:account_id/custom_audiences/:custom_audience_id
Delete the specified Custom Audience belonging to the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/custom_audiences/:custom_audience_id
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| custom_audience_id required | A reference to the custom audience you are operating with in the request. Type: string Example: 2906h |
DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/custom_audiences/2906h
Example Response
Do Not Reach Lists
GET accounts/:account_id/do_not_reach_lists
Retrieve details for some or all Do Not Reach List associated with the current account. Note: Anaccount_id can only have at most one Do Not Reach List
Resource URL
https://ads-api.x.com/12/accounts/:account_id/do_not_reach_lists
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| with_deleted optional | Include deleted results in your request. Type: boolean Default: false Possible values: true, false |
GET https://ads-api.x.com/12/accounts/18ce54bgxky/do_not_reach_lists
Example Response
POST accounts/:account_id/do_not_reach_lists
Create a new Do Not Reach List associated with the current account. Note: Anaccount_id can only have at most one Do Not Reach List
Resource URL
https://ads-api.x.com/12/accounts/:account_id/do_not_reach_lists
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| description optional | A description for this audience. Type: string Example: A list of users to exclude |
POST https://ads-api.x.com/12/accounts/18ce54bgxky/do_not_reach_lists?description=A list of users to exclude
Example Response
POST batch/accounts/:account_id/do_not_reach_lists/:do_not_reach_list_id/users
This endpoint allows users to be added, updated and removed from a givendo_not_reach_list_id. This endpoint only accepts emails as the valid user identifier type.
All data being provided in the emails field of the request must be hashed using SHA256 and normalized.
Notes
- An
account_idcan only have at most one Do Not Reach List - Users added to this list must have an
expires_attimestamp set to less than 13 months from the current timestamp - Do Not Reach List API does not accept an
effective_attimestamp and defaults to the current timestamp - Do Not Reach List does not remove users from any or all custom audiences in the account but acts as exclusion targeting for all campaigns served for the account
- The current maximum batch size is
2500for this endpoint. The batch size is determined by the number of operations (Update/Delete) per request. For example, over 2500 operation objects ({"operation_type": "Update/Delete", [..] }) in one array result in an error. - The max request POST body size this endpoint can accept is
5,000,000bytes. - The rate limits for this endpoint are 1500 per 1 minute window
- All parameters are sent in the request body and a
Content-Typeofapplication/jsonis required. - Batch requests fail or succeed together as a group and all API responses for both error and success preserve the item order of the initial request.
success_count and a total_count. These values must always be equal, and they are a count of the number of records in the request that have been processed by the backend. A situation where the number of records sent in the request body is not equal the success_count and total_count should be treated as an error condition, requiring a retry.
Batch Errors
- Request-level errors (eg. max batch size exceeded) are shown in the response under the
errorsobject. - Item-level errors (eg. missing required parameters) are show in the response under the
operation_errorsobject. - The index of the error in the
operation_errorsrefers to the index in the input item, with the corresponding error message
https://ads-api.x.com/12/batch/accounts/:account_id/do_not_reach_lists/:do_not_reach_list_id/users
Parameters
| Name | Description |
|---|---|
| account_id required | The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertiser API requests excluding GET accounts. The specified account must be associated with the authenticated user. Type: string Example: 18ce54d4x5t |
| do_not_reach_list_id required | A reference to the Do Not Reach List you are operating with in the request Type: string Example: 2906h |
| operation_type required | The per users group operation type being performed.Type: enum Possible values: Update, Delete |
| params required | A JSON object containing the emails array and expires_at timestamp.Type: JSON |
| users required | An array of JSON objects containing all params for an individual user. Type: JSON |
| expires_at optional | The UTC time at which the user association(s) should expire. The specified time must be later than the value of the current timestamp. Expressed in ISO 8601. Defaults to 13 months from current timestamp. Type: string Example: 2017-07-05T07:00:00Z |
users object, each element of this object is documented below:
| Name | Description |
|---|---|
| email optional | Email address(es) for the user. Type: Array[String] |
| phone_number optional | Phone number(s) for the user Type: Array[String] |
DELETE accounts/:account_id/do_not_reach_lists/:do_not_reach_list_id
Delete the specified Do Not Reach List belonging to the current account. Resource URLhttps://ads-api.x.com/12/accounts/:account_id/do_not_reach_lists/:do_not_reach_list_id
Parameters
None
Example Request
DELETE https://ads-api.x.com/12/accounts/18ce54bgxky/do_not_reach_lists/4ofrp
Example Response