Create a campaign (also called sub-project)
Create
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | campaigns.json | |
| General | Yes | Parameters described in overview | Authorization: Bearer <access_token> header — see Synergist API Authentication | Structure of an API call |
| Action | Yes | The action to perform | action=create | |
| Input | Yes | JSON string | See below |
| JSON Input | Mandatory | Description | Examples |
|---|---|---|---|
| Company | Yes | Campaign company | "campaignCompany":1 |
| Campaign name | Yes | Campaign name | "campaignName": "Client project campaing 2025" |
| Client Code | No | Client code. Only pass a client code if you want the new campaign to be associated with a client | "campaignClientCode":"43/ANIM4" |
| Project No | No | Project number | "campaignProjectNo":617 |
Example request (OAuth 2.0):
creating campaing with a client & project
Authorization: Bearer <access_token>
https://<SERVER>/jsonapi/campaigns.json?version=6&&action=create&input={
"data": [
{
"campaignName": "Client project campaing 2025",
"campaignCompany": 1,
"campaignClientCode": "43/ANIM4",
"campaignProjectNo": 617
}
]
}
Example request (legacy username/password):
https://<SERVER>/jsonapi/campaigns.json?version=6&&action=create&input={
"data": [
{
"campaignName": "Client project campaing 2025",
"campaignCompany": 1,
"campaignClientCode": "43/ANIM4",
"campaignProjectNo": 617
}
]
}&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "data processed successfully.",
"warningmessage": "",
"success": true,
"synversion": "15.000.0017",
"synapiversion": 6,
"data": [
{
"campaignUuid": "13B75CD3006D53409543A5BFFB4DA067",
"campaignNo": 431,
"campaignTimeStampModified": 1753726201,
"campaignRecordVersionNumber": 0
}
]
}