Scheduled Promoted Tweets
scheduled-promoted-tweets

Scheduled Promoted Tweets

GET accounts/:account_id/scheduled_promoted_tweets

Retrieve details for some or all scheduled promoted Tweets associated with the current account.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/scheduled_promoted_tweets

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

line_item_ids
optional

Scope the response to just the scheduled Tweets associated with specific line items by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 8xdpe

scheduled_promoted_tweet_ids
optional

Scope the response to just the desired scheduled promoted Tweets by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 1xboq

sort_by
optional

Sorts by supported attribute in ascending or descending order. See Sorting for more information.

Type: string

Example: created_at-asc

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

Example Request

GET https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_promoted_tweets?scheduled_promoted_tweet_ids=1xboq

Example Response

{
  "request": {
    "params": {
      "scheduled_promoted_tweet_ids": [
        "1xboq"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "line_item_id": "8xdpe",
      "id": "1xboq",
      "created_at": "2017-06-01T19:53:32Z",
      "updated_at": "2017-06-01T20:00:06Z",
      "scheduled_tweet_id": "870366669373194240",
      "tweet_id": "870369382207070208",
      "deleted": false
    }
  ]
}

GET accounts/:account_id/scheduled_promoted_tweets/:scheduled_promoted_tweet_id

Retrieve a specific scheduled promoted Tweet associated with the current account.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/scheduled_promoted_tweets/:scheduled_promoted_tweet_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

scheduled_promoted_tweet_id
required

A reference to the scheduled promoted Tweet you are operating with in the request.

Type: string

Example: 1xboq

with_deleted
optional

Include deleted results in your request.

Type: boolean

Default: false
Possible values: true, false

Example Request

GET https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_promoted_tweets/1xboq

Example Response

{
  "request": {
    "params": {
      "scheduled_promoted_tweet_id": "1xboq",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "line_item_id": "8xdpe",
    "id": "1xboq",
    "created_at": "2017-06-01T19:53:32Z",
    "updated_at": "2017-06-01T20:00:06Z",
    "scheduled_tweet_id": "870366669373194240",
    "tweet_id": "870369382207070208",
    "deleted": false
  }
}

POST accounts/:account_id/scheduled_promoted_tweets

Associate a scheduled Tweet with the specified line item.

Note: It is not possible to update (PUT) scheduled promoted Tweet entities.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/scheduled_promoted_tweets

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

line_item_id
required

A reference to the line item you are operating with in the request.

Type: string

Example: 8xdpe

scheduled_tweet_id
required

A reference to the scheduled Tweet you are operating with in the request.

Type: long

Example: 870358555227860992

Example Request

POST https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_promoted_tweets?line_item_id=8xdpe&scheduled_tweet_id=870358555227860992

Example Response

{
  "data": {
    "line_item_id": "8xdpe",
    "id": "1xtfl",
    "created_at": "2017-06-08T07:25:26Z",
    "updated_at": "2017-06-08T07:25:26Z",
    "scheduled_tweet_id": "870358555227860992",
    "tweet_id": null,
    "deleted": false
  },
  "request": {
    "params": {
      "line_item_id": "8xdpe",
      "scheduled_tweet_id": 870358555227860992,
      "account_id": "18ce54d4x5t"
    }
  }
}

DELETE accounts/:account_id/scheduled_promoted_tweets/:scheduled_promoted_tweet_id

Disassociate a scheduled Tweet from the specified line item.

Note: scheduled_promoted_tweets can only be deleted before the scheduled Tweet's scheduled_at time.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/scheduled_tweets/:scheduled_tweet_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

scheduled_promoted_tweet_id
required

A reference to the scheduled promoted Tweet you are operating with in the request. This is the id attribute from a GET accounts/:account_id/scheduled_promoted_tweets response object.

Type: string

Example: 1xtfl

Example Request

DELETE https://ads-api.x.com/12/accounts/18ce54d4x5t/scheduled_promoted_tweets/1xtfl

Example Response

{
  "data": {
    "line_item_id": "8xdpe",
    "id": "1xtfl",
    "created_at": "2017-06-08T07:25:26Z",
    "updated_at": "2017-06-15T05:14:12Z",
    "scheduled_tweet_id": "870358555227860992",
    "tweet_id": null,
    "deleted": true
  },
  "request": {
    "params": {
      "scheduled_promoted_tweet_id": "1xtfl",
      "account_id": "18ce54d4x5t"
    }
  }
}