GET accounts/:account_id/campaigns

Retrieve details for some or all campaigns associated with the current account.

Resource URL

https://ads-api.twitter.com/1/accounts/:account_id/campaigns

Resource Information

Response formats JSON
Requires authentication? Yes (user context only)
Rate limited? Yes

Parameters

Name Required Description Default Value Example
account_id required The identifier for the leveraged account. Appears within the resource’s path and is generally a required parameter for all Advertising API requests excluding GET accounts . The specified account must be associated with the authenticating user. Note that this parameter is part of the resources path and should not be included as an additional parameter in your request.   43853bhii879
campaign_ids optional Scope the response to just the desired campaigns by specifying a comma-separated list of identifiers. Up to 50 ids may be provided.   1wxdf8jujgo9,1wxdf8jujoe1
funding_instrument_ids optional Scope the response to just the desired funding instruments by specifying a comma-separated list of identifiers. Up to 50 ids may be provided.   43853bhii885 43853bhii885,43853bhii87d,43853bhii89x
with_deleted optional Include deleted results for your request. false true
count optional Specifies the number of results to try to return per response, up to a maximum of 1000 200 1000
cursor optional Specifies a cursor to get the next page of results. See pagination for more information.   gc-ddf4a
sort_by optional Sorts by supported attribute in ascending or descending order. See sorting for more information.   created_at-asc, updated_at-desc
draft_only optional Scope the response to just draft campaigns. false true

Example Request

GET https://ads-api.twitter.com/1/accounts/18ce54d4x5t/campaigns?with_deleted=true&campaign_ids=68rnt,69epk

Example Response

{
  "request": {
    "params": {
      "with_deleted": true,
      "campaign_ids": [
        "68rnt",
        "69epk"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "data": [
    {
      "name": "app-installs",
      "start_time": "2016-10-01T00:00:01Z",
      "reasons_not_servable": [
        "PAUSED_BY_ADVERTISER"
      ],
      "servable": false,
      "daily_budget_amount_local_micro": 140000000,
      "end_time": null,
      "funding_instrument_id": "lygyi",
      "duration_in_days": null,
      "standard_delivery": true,
      "total_budget_amount_local_micro": 3210000000,
      "id": "68rnt",
      "entity_status": "PAUSED",
      "paused": true,
      "account_id": "18ce54d4x5t",
      "frequency_cap": null,
      "currency": "USD",
      "created_at": "2016-10-22T05:39:37Z",
      "updated_at": "2016-10-22T05:39:37Z",
      "deleted": false
    },
    {
      "name": "language-campaign",
      "start_time": "2016-10-01T00:00:01Z",
      "reasons_not_servable": [],
      "servable": true,
      "daily_budget_amount_local_micro": 50000000,
      "end_time": null,
      "funding_instrument_id": "lygyi",
      "duration_in_days": null,
      "standard_delivery": true,
      "total_budget_amount_local_micro": 1000000000,
      "id": "69epk",
      "entity_status": "ACTIVE",
      "paused": false,
      "account_id": "18ce54d4x5t",
      "frequency_cap": null,
      "currency": "USD",
      "created_at": "2016-10-24T21:44:45Z",
      "updated_at": "2016-10-24T21:59:32Z",
      "deleted": false
    }
  ],
  "data_type": "campaign",
  "total_count": 2,
  "next_cursor": null
}