Create a Pinterest campaign
curl --request POST \
--url https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/create-pinterest-campaign \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"adAccountId": "<string>",
"payload": {
"name": "<string>",
"objectiveType": "<string>",
"status": "PAUSED",
"budget": 123,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
adAccountId: '<string>',
payload: {
name: '<string>',
objectiveType: '<string>',
status: 'PAUSED',
budget: 123,
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/create-pinterest-campaign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/create-pinterest-campaign"
payload = {
"adAccountId": "<string>",
"payload": {
"name": "<string>",
"objectiveType": "<string>",
"status": "PAUSED",
"budget": 123,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"result": {},
"asset": {
"key": "<string>",
"platform": "<string>",
"adAccountId": "<string>",
"assetType": "campaign",
"assetId": "<string>",
"name": "<string>",
"supportedWrites": [
"name"
],
"parentAssetId": "<string>",
"status": "<string>",
"effectiveStatus": "<string>",
"dailyBudget": 123,
"lifetimeBudget": 123,
"updatedAt": "2023-11-07T05:31:56Z"
},
"results": [
{}
]
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Campaign actions
Create a Pinterest campaign
Creates a campaign for a connected Pinterest account. New campaigns default to paused unless ACTIVE is explicit.
POST
/
platform
/
{storeUrl}
/
actions
/
create-pinterest-campaign
Create a Pinterest campaign
curl --request POST \
--url https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/create-pinterest-campaign \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"adAccountId": "<string>",
"payload": {
"name": "<string>",
"objectiveType": "<string>",
"status": "PAUSED",
"budget": 123,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
adAccountId: '<string>',
payload: {
name: '<string>',
objectiveType: '<string>',
status: 'PAUSED',
budget: 123,
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/create-pinterest-campaign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/create-pinterest-campaign"
payload = {
"adAccountId": "<string>",
"payload": {
"name": "<string>",
"objectiveType": "<string>",
"status": "PAUSED",
"budget": 123,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"result": {},
"asset": {
"key": "<string>",
"platform": "<string>",
"adAccountId": "<string>",
"assetType": "campaign",
"assetId": "<string>",
"name": "<string>",
"supportedWrites": [
"name"
],
"parentAssetId": "<string>",
"status": "<string>",
"effectiveStatus": "<string>",
"dailyBudget": 123,
"lifetimeBudget": 123,
"updatedAt": "2023-11-07T05:31:56Z"
},
"results": [
{}
]
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
A server-side Bily API key created under Settings > MCP > Access key fallback. Select the intended store before creating it.
Headers
An organization ID returned by GET /context or GET /organizations. Required for GET /stores and optional for store-scoped paths.
Example:
"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"
Path Parameters
The exact store URL returned by GET /context or GET /stores.
Example:
"store.example.com"