For the complete documentation index, see llms.txt. This page is also available as Markdown.

Targeting Keys

Manage targeting keys

Get targeting keys of the account

get

Return the list of the targeting keys of the account

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

Query parameters
_pageintegerOptional

Index of the page

Example: 0
_max_per_pageintegerOptional

Number of items per page

Example: 10
Responses
200

Success

application/json
current_item_countinteger · intOptional

Returns the number of items in the current page

current_pageinteger · intOptional

Returns the number of the current page

Default: 0
total_countinteger · intOptional

Returns the number of total items

items_per_pageinteger · intOptional

Returns the number of items per page

Default: 10
last_pageinteger · intOptional

Returns the index of the page

get/accounts/{account_id}/targeting_keys
GET /v1/accounts/{account_id}/targeting_keys HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "current_item_count": 1,
  "current_page": 0,
  "total_count": 1,
  "items_per_page": 10,
  "last_page": 1,
  "items": [
    {
      "id": "text",
      "type": "string",
      "name": "text",
      "description": "text"
    }
  ]
}

Create one/multiple targeting key(s)

post

Create one/multiple targeting key(s)

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

Body
idstringRead-onlyOptional

ID of the targeting_key

typestring · enumRequired

Type of the targeting_key

Possible values:
namestringRequired

Name of the targeting key

descriptionstringRequired

Description of the targeting key

Responses
201

Created

application/json
idstringRead-onlyOptional

ID of the targeting_key

typestring · enumRequired

Type of the targeting_key

Possible values:
namestringRequired

Name of the targeting key

descriptionstringRequired

Description of the targeting key

post/accounts/{account_id}/targeting_keys
POST /v1/accounts/{account_id}/targeting_keys HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 124

{
  "targeting_keys": [
    {
      "type": "string",
      "name": "text",
      "description": "text"
    }
  ],
  "type": "string",
  "name": "text",
  "description": "text"
}
{
  "id": "text",
  "type": "string",
  "name": "text",
  "description": "text"
}

Get one targeting key

get

Return one targeting key by its id

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

targeting_key_idstringRequired

The ID of the targeting_key

Responses
200

Success

application/json
idstringRead-onlyOptional

ID of the targeting_key

typestring · enumRequired

Type of the targeting_key

Possible values:
namestringRequired

Name of the targeting key

descriptionstringRequired

Description of the targeting key

get/accounts/{account_id}/targeting_keys/{targeting_key_id}
GET /v1/accounts/{account_id}/targeting_keys/{targeting_key_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": "text",
  "type": "string",
  "name": "text",
  "description": "text"
}

Delete a targeting key

delete

Delete a targeting key by its id.

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

targeting_key_idstringRequired

The ID of the targeting_key

Responses
204

Deleted

No content

delete/accounts/{account_id}/targeting_keys/{targeting_key_id}
DELETE /v1/accounts/{account_id}/targeting_keys/{targeting_key_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*

No content

Update a targeting key

patch

Update targeting key informations - You can set only the properies you want to update in the request body.

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

targeting_key_idstringRequired

The ID of the targeting_key

Body
idstringRead-onlyOptional

ID of the targeting_key

typestring · enumRequired

Type of the targeting_key

Possible values:
namestringRequired

Name of the targeting key

descriptionstringRequired

Description of the targeting key

Responses
200

Updated

application/json
idstringRead-onlyOptional

ID of the targeting_key

typestring · enumRequired

Type of the targeting_key

Possible values:
namestringRequired

Name of the targeting key

descriptionstringRequired

Description of the targeting key

patch/accounts/{account_id}/targeting_keys/{targeting_key_id}
PATCH /v1/accounts/{account_id}/targeting_keys/{targeting_key_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "type": "string",
  "name": "text",
  "description": "text"
}
{
  "id": "text",
  "type": "string",
  "name": "text",
  "description": "text"
}

Last updated

Was this helpful?