curl -X POST \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns \
-H 'Authorization: Bearer {{TOKEN}}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Marketing Campaign",
"trigger": {
"code":"M"
},
"template":"Hi {{{contact.firstName}}}",
"reporting":{"when":"NoReport"}
}'
{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"fieldMappings": [
{
"attribute": "<string>",
"column": "<string>",
"mandatory": true
}
],
"filters": {
"list": {
"id": "<string>",
"name": "<string>",
"source": {
"id": "<string>",
"integration": "<string>",
"lastSynced": "<string>"
},
"keyword": "<string>",
"doubleOptIn": {
"enabled": true,
"prompt": "<string>"
},
"filter": {
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"list": "<string>",
"valid": true,
"invalid": true,
"blocked": true,
"unblocked": true,
"optIn": true
},
"optInConfirmation": "<string>"
},
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"tags": [
{
"tag": "<string>",
"visible": true
}
]
},
"media": [
{
"url": "<string>",
"type": "<string>",
"name": "<string>",
"filename": "<string>"
}
],
"phoneNumberFilter": {
"group": {
"id": "<string>"
}
},
"schedule": {
"frequency": "OD",
"timezone": "<string>",
"cron": "<string>"
},
"nextExecution": "<string>",
"reporting": {
"when": "<string>",
"delay": "<string>",
"unit": "<string>",
"destination": "<string>"
},
"template": "<string>",
"trigger": {
"code": "<string>",
"name": "<string>"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"paused": "<string>",
"lastJob": {
"id": "<string>",
"submitted": 123,
"status": "<string>",
"price": 123,
"failures": 123,
"invalid": [
{}
],
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
}
}
}
}
curl -X POST \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns \
-H 'Authorization: Bearer {{TOKEN}}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Marketing Campaign",
"trigger": {
"code":"M"
},
"template":"Hi {{{contact.firstName}}}",
"reporting":{"when":"NoReport"}
}'
{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"fieldMappings": [
{
"attribute": "<string>",
"column": "<string>",
"mandatory": true
}
],
"filters": {
"list": {
"id": "<string>",
"name": "<string>",
"source": {
"id": "<string>",
"integration": "<string>",
"lastSynced": "<string>"
},
"keyword": "<string>",
"doubleOptIn": {
"enabled": true,
"prompt": "<string>"
},
"filter": {
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"list": "<string>",
"valid": true,
"invalid": true,
"blocked": true,
"unblocked": true,
"optIn": true
},
"optInConfirmation": "<string>"
},
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"tags": [
{
"tag": "<string>",
"visible": true
}
]
},
"media": [
{
"url": "<string>",
"type": "<string>",
"name": "<string>",
"filename": "<string>"
}
],
"phoneNumberFilter": {
"group": {
"id": "<string>"
}
},
"schedule": {
"frequency": "OD",
"timezone": "<string>",
"cron": "<string>"
},
"nextExecution": "<string>",
"reporting": {
"when": "<string>",
"delay": "<string>",
"unit": "<string>",
"destination": "<string>"
},
"template": "<string>",
"trigger": {
"code": "<string>",
"name": "<string>"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"paused": "<string>",
"lastJob": {
"id": "<string>",
"submitted": 123,
"status": "<string>",
"price": 123,
"failures": 123,
"invalid": [
{}
],
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
}
}
}
}
The access token received from the authorization server in the OAuth 2.0 flow.
Account to apply operations to
successful operation
The response is of type object
.