Create a workspace-owned campaign type
curl --request POST \
--url https://api.pineyard.ai/campaign-types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"extractionKeys": [
{
"name": "<string>",
"description": "<string>"
}
],
"description": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
extractionKeys: [{name: '<string>', description: '<string>'}],
description: '<string>'
})
};
fetch('https://api.pineyard.ai/campaign-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaign-types"
payload = {
"name": "<string>",
"extractionKeys": [
{
"name": "<string>",
"description": "<string>"
}
],
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"description": "<string>",
"extractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"status": "ACTIVE",
"isOwn": true
}Campaign types
Create a workspace-owned campaign type
POST
/
campaign-types
Create a workspace-owned campaign type
curl --request POST \
--url https://api.pineyard.ai/campaign-types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"extractionKeys": [
{
"name": "<string>",
"description": "<string>"
}
],
"description": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
extractionKeys: [{name: '<string>', description: '<string>'}],
description: '<string>'
})
};
fetch('https://api.pineyard.ai/campaign-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaign-types"
payload = {
"name": "<string>",
"extractionKeys": [
{
"name": "<string>",
"description": "<string>"
}
],
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"description": "<string>",
"extractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"status": "ACTIVE",
"isOwn": true
}Required scope:
campaign_types.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json

