Targeting Keys

Manage targeting keys

Get targeting keys of the account

get

Return the list of the targeting keys of the account

Authorizations
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
Responseall of
get
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
Path parameters
account_idstringRequired

The ID of the account

Body
all ofOptional
Responses
201

Created

application/json
post
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
Path parameters
account_idstringRequired

The ID of the account

targeting_key_idstringRequired

The ID of the targeting_key

Responses
200

Success

application/json
get
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
Path parameters
account_idstringRequired

The ID of the account

targeting_key_idstringRequired

The ID of the targeting_key

Responses
204

Deleted

No content

delete
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
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
patch
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"
}

Was this helpful?