Line Item Apps

GET accounts/:account_id/line_item_apps

Retrieve details for some or all apps associated with line items under the current account.

Resource URL

https://ads-api.twitter.com/6/accounts/:account_id/line_item_apps

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 apps associated with the specified line items by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 6syda

line_item_app_ids
optional

Scope the response to just the desired line item apps by specifying a comma-separated list of identifiers. Up to 200 IDs may be provided.

Type: string

Example: 1eegy

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.twitter.com/6/accounts/18ce54d4x5t/line_item_apps?line_item_app_ids=1eegy

Example Response

{
  "data": [
    {
      "line_item_id": "6syda",
      "app_store_identifier": "com.twitter.android",
      "id": "1eegy",
      "created_at": "2016-11-18T18:20:18Z",
      "updated_at": "2016-11-18T18:20:18Z",
      "os_type": "Android",
      "deleted": false
    }
  ],
  "next_cursor": null,
  "request": {
    "params": {
      "line_item_app_ids": [
        "1eegy"
      ],
      "account_id": "18ce54d4x5t"
    }
  }
}

GET accounts/:account_id/line_item_apps/:line_item_app_id

Retrieve a specific line item to mobile app association.

Resource URL

https://ads-api.twitter.com/6/accounts/:account_id/line_item_apps/:line_item_app_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

line_item_app_id
required

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

Type: string

Example: vbbj

with_deleted
optional

Include deleted results in your request.

Type: boolean

Default: false
Possible values: true, false

Example Request

GET https://ads-api.twitter.com/6/accounts/hkk5/line_items_apps/vbbj

Example Response

{
  "data": {
    "line_item_id": "4w9x5",
    "app_store_identifier": "87654321",
    "id": "vbbj",
    "created_at": "2016-04-10T01:46:33Z",
    "updated_at": "2016-04-10T01:46:33Z",
    "os_type": "iOS",
    "deleted": false
  },
  "request": {
    "params": {
      "line_item_app_id": "vbbj",
      "account_id": "hkk5"
    }
  }
}

POST accounts/:account_id/line_item_apps

Associate a mobile app with the specified line item to enable mobile app promotion on the Twitter Audience Platform.

Note: It is not possible to update (PUT) line item apps.

Resource URL

https://ads-api.twitter.com/6/accounts/:account_id/line_item_apps

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

app_store_identifier
required

The app store identifier.

Type: string

Example: com.twitter.android

line_item_id
required

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

Type: string

Example: 6syld

os_type
required

The operating system type.

Type: enum

Possible values: ANDROID, IOS

Example Request

POST https://ads-api.twitter.com/6/accounts/18ce54d4x5t/line_item_apps?line_item_id=6syld&app_store_identifier=com.twitter.android&os_type=ANDROID

Example Response

{
  "data": {
    "line_item_id": "6syld",
    "app_store_identifier": "com.twitter.android",
    "id": "1x153",
    "created_at": "2017-08-23T19:41:33Z",
    "updated_at": "2017-08-23T19:41:33Z",
    "os_type": "Android",
    "deleted": false
  }
}

DELETE accounts/:account_id/line_item_apps/:line_item_app_id

Disassociate a mobile app from the specified line item.

Resource URL

https://ads-api.twitter.com/6/accounts/:account_id/line_item_apps/:line_item_app_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

line_item_app_id
required

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

Type: string

Example: 1wu1i

Example Request

DELETE https://ads-api.twitter.com/6/accounts/18ce54d4x5t/line_item_apps/1wu1i

Example Response

{
  "data": {
    "line_item_id": "9pl99",
    "app_store_identifier": "com.twitter.android",
    "id": "1wu1i",
    "created_at": "2017-08-17T15:51:19Z",
    "updated_at": "2017-08-23T19:11:49Z",
    "os_type": "Android",
    "deleted": true
  },
  "request": {
    "params": {
      "line_item_app_id": "1wu1i",
      "account_id": "18ce54d4x5t"
    }
  }
}