Create creative collection
curl --request POST \
--url https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-collections"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-collections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"collection": {
"collection_id": "<string>",
"name": "<string>",
"member_count": 4503599627370495,
"creative_count": 4503599627370495,
"asset_count": 4503599627370495,
"attached_campaign_count": 4503599627370495,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"campaign_id": "<string>",
"advertiser_id": "<string>",
"owner_scope": "advertiser",
"description": "<string>",
"metadata": {},
"parent_id": "<string>",
"descendant_member_count": 4503599627370495,
"members": [
{
"member_type": "creative",
"member_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"metadata": {},
"creative": {
"creative_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_count": 3,
"revision": 4503599627370495,
"assembly_state": "draft",
"preview_revision": "<string>",
"campaign_id": "<string>",
"format_id": {
"id": "<string>",
"agent_url": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123
},
"format_kind": "<string>",
"template_id": "<string>",
"brand_domain": "<string>",
"preview_url": "<string>",
"requires_upgrade": true,
"reuse_count": 4503599627370495,
"creative_role": "evergreen",
"creative_source": "uploaded",
"platform_links": [
{
"agent_id": "<string>",
"agent_name": "<string>",
"status": "<string>",
"platform_id": "<string>",
"approval_status": "<string>",
"rejection_reason": "<string>",
"synced_at": "2023-11-07T05:31:56Z",
"sync_stage": "not_sent",
"must_act": "seller",
"sync_reason": "account_not_linked",
"seller_acknowledgement": {
"origin": "seller",
"errors": [
{
"code": "<string>",
"message": "<string>"
}
]
},
"seller_errors": [
{
"code": "<string>",
"recovery": "transient",
"field": "<string>",
"issues": [
{
"pointer": "<string>"
}
]
}
]
}
],
"primary_asset_type": "IMAGE",
"sync_status": {
"synced": true,
"agent_count": 0
},
"target_format_ids": [
{
"id": "<string>",
"agent_url": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123
}
],
"placements": [
{
"placement_id": "<string>",
"placement_name": "<string>"
}
]
}
}
],
"attachments": [
{
"campaign_id": "<string>",
"collection_id": "<string>",
"role": "creative_library",
"sync_policy": "manual",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
]
},
"added_count": 4503599627370495,
"removed_count": 4503599627370495,
"attached": {
"campaign_id": "<string>",
"collection_id": "<string>",
"role": "creative_library",
"sync_policy": "manual",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
},
"assigned_count": 4503599627370495,
"legacy_members_excluded": 4503599627370495,
"ownership_excluded": 4503599627370495
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Creatives
Create creative collection
Create a creative collection of saved creatives and assets, optionally attaching it to the campaign.
POST
/
campaigns
/
{campaignId}
/
creative-collections
Create creative collection
curl --request POST \
--url https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-collections"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.apostra.com/api/v2/buyer/campaigns/{campaignId}/creative-collections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"collection": {
"collection_id": "<string>",
"name": "<string>",
"member_count": 4503599627370495,
"creative_count": 4503599627370495,
"asset_count": 4503599627370495,
"attached_campaign_count": 4503599627370495,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"campaign_id": "<string>",
"advertiser_id": "<string>",
"owner_scope": "advertiser",
"description": "<string>",
"metadata": {},
"parent_id": "<string>",
"descendant_member_count": 4503599627370495,
"members": [
{
"member_type": "creative",
"member_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"metadata": {},
"creative": {
"creative_id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_count": 3,
"revision": 4503599627370495,
"assembly_state": "draft",
"preview_revision": "<string>",
"campaign_id": "<string>",
"format_id": {
"id": "<string>",
"agent_url": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123
},
"format_kind": "<string>",
"template_id": "<string>",
"brand_domain": "<string>",
"preview_url": "<string>",
"requires_upgrade": true,
"reuse_count": 4503599627370495,
"creative_role": "evergreen",
"creative_source": "uploaded",
"platform_links": [
{
"agent_id": "<string>",
"agent_name": "<string>",
"status": "<string>",
"platform_id": "<string>",
"approval_status": "<string>",
"rejection_reason": "<string>",
"synced_at": "2023-11-07T05:31:56Z",
"sync_stage": "not_sent",
"must_act": "seller",
"sync_reason": "account_not_linked",
"seller_acknowledgement": {
"origin": "seller",
"errors": [
{
"code": "<string>",
"message": "<string>"
}
]
},
"seller_errors": [
{
"code": "<string>",
"recovery": "transient",
"field": "<string>",
"issues": [
{
"pointer": "<string>"
}
]
}
]
}
],
"primary_asset_type": "IMAGE",
"sync_status": {
"synced": true,
"agent_count": 0
},
"target_format_ids": [
{
"id": "<string>",
"agent_url": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123
}
],
"placements": [
{
"placement_id": "<string>",
"placement_name": "<string>"
}
]
}
}
],
"attachments": [
{
"campaign_id": "<string>",
"collection_id": "<string>",
"role": "creative_library",
"sync_policy": "manual",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
]
},
"added_count": 4503599627370495,
"removed_count": 4503599627370495,
"attached": {
"campaign_id": "<string>",
"collection_id": "<string>",
"role": "creative_library",
"sync_policy": "manual",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
},
"assigned_count": 4503599627370495,
"legacy_members_excluded": 4503599627370495,
"ownership_excluded": 4503599627370495
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Body
application/json
Create a campaign creative workspace for saved creatives and raw/generated assets.
Response
Create creative collection
Mutation response for collection management.