AddMailCampaignToQueue

Function to add a new e-mail do queue

POST https://rest.crmango.com/api/AddMailCampaignToQueue

Authorization

1 Sent in the request headers
Bearer varchar

Auth token

Body data

11 Sent in the request body
campaign_id integer

Campaign id

recipients array

E-mail addresess where campaign will be send

from_email_name string

Name of e-mail address

from_email string

Text before @ symbol in e-mail address

reply_to string

Email address where user can reply

errors_to_email string

E-mail where we can send errors

show_campaign_mango boolean

Show info about campaign in mango

create_campaign_activity boolean

Create activity about send campaign in mango

created_by integer

User to assigne activity in mango

send_datetime timesatmp

When to send e-mail campaign

html_objects array

E-mail html objects

Response

3 HTTP 201

Function to add a new e-mail do queue

code integer

Return code

message varchar

Info message

campaign_uuid uuid

UUID of the created resource

Example request

curl --request POST \
  --url 'https://rest.crmango.com/api/AddMailCampaignToQueue' \
  --header 'Authorization: Bearer auth_token' \
  --header 'Content-Type: application/json' \
  --data '{
    "data": {
      "campaign_id": "12",
      "recipients": [
        "martin.pekny@gmail.com",
        "tomas.pekny@gmail.com"
      ],
      "from_email_name": "Info Crmango.com",
      "from_email": "info",
      "reply_to": "reply@crmango.com",
      "errors_to_email": "error@crmango.com",
      "show_campaign_mango": 1,
      "create_campaign_activity": 0,
      "created_by": 7,
      "send_datetime": "2023-11-13 10:34:00",
      "html_objects": [
        "your html object"
      ]
    }
  }'
{
    "code": 201,
    "message": "Campaign was added to queue",
    "campaign_uuid": "c82e2b71-8b68-4cd4-a4c4-6b62e0bec57c"
}