POST
/
v1
/
accounts
/
{accountId}
/
quickcampaigns
Create and Execute a campaign
curl --request POST \
  --url https://api.sakari.io/v1/accounts/{accountId}/quickcampaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "groupId": "<string>",
  "listId": "<string>",
  "message": {
    "message": "<string>",
    "media": [
      {
        "url": "<string>",
        "type": "<string>",
        "name": "<string>",
        "filename": "<string>"
      }
    ]
  },
  "sendAt": "2023-11-07T05:31:56Z"
}'
{
  "success": true,
  "data": {
    "campaign": {
      "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>"
          }
        }
      }
    },
    "job": {
      "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>"
        }
      }
    }
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

accountId
string
required

Account to apply operations to

Body

application/json

Response

200
application/json

successful operation

The response is of type object.