curl --request POST \
--url https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creative-collections/{collectionId}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "creative_library",
"sync_policy": "manual",
"metadata": {}
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creative-collections/{collectionId}/attach"
payload = {
"role": "creative_library",
"sync_policy": "manual",
"metadata": {}
}
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({role: 'creative_library', sync_policy: 'manual', metadata: {}})
};
fetch('https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creative-collections/{collectionId}/attach', 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": {},
"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,
"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>",
"synced_at": "2023-11-07T05:31:56Z"
}
],
"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": {}
}
}Attach creative collection to campaign
Attach a creative collection to the campaign as a library, source asset set, approved set, or testing set.
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creative-collections/{collectionId}/attach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "creative_library",
"sync_policy": "manual",
"metadata": {}
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creative-collections/{collectionId}/attach"
payload = {
"role": "creative_library",
"sync_policy": "manual",
"metadata": {}
}
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({role: 'creative_library', sync_policy: 'manual', metadata: {}})
};
fetch('https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creative-collections/{collectionId}/attach', 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": {},
"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,
"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>",
"synced_at": "2023-11-07T05:31:56Z"
}
],
"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": {}
}
}Authorizations
API key or access token
Path Parameters
11Body
Attach collection metadata to the campaign workspace. This does not launch or sync creatives by itself.
How a campaign uses the collection: working creative library, source assets, approved launch set, or testing set.
creative_library, source_assets, approved_set, test_set Whether campaign attachment changes are manual or automatically include new collection members.
manual, auto_include_new_members Show child attributes
Show child attributes
Response
Attach creative collection to campaign
Mutation response for collection management.
A creative collection owned by an advertiser, campaign, or customer workspace.
Show child attributes
Show child attributes
0 <= x <= 90071992547409910 <= x <= 9007199254740991Campaign attachment metadata for a creative collection.
Show child attributes
Show child attributes
Number of creative_manifest_campaign rows created by this operation.
0 <= x <= 9007199254740991Creative members skipped because their manifest lacks format_kind (upgrade required).
0 <= x <= 9007199254740991Creative members skipped because their manifest belongs to a different advertiser than the campaign.
0 <= x <= 9007199254740991