Targeting Keys
Manage targeting keys
Return the list of the targeting keys of the account
Authorizations
Path parameters
account_idstringRequired
The ID of the account
Query parameters
_pageintegerOptionalExample:
Index of the page
0
_max_per_pageintegerOptionalExample:
Number of items per page
10
Responses
200
Success
application/json
Responseall of
404
Not Found
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)
Authorizations
Path parameters
account_idstringRequired
The ID of the account
Body
all ofOptional
Responses
201
Created
application/json
400
Validation errors
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"
}
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
404
Not Found
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 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
404
Not Found
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 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 · enumRequiredPossible values:
Type of the targeting_key
namestringRequired
Name of the targeting key
descriptionstringRequired
Description of the targeting key
Responses
200
Updated
application/json
400
Validation errors
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?