Skip to main content
POST
/
v1
/
marketing_campaigns
Create a marketing campaign
curl --request POST \
  --url https://api.scribe-mail.com/v1/marketing_campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "marketing_campaign": {
    "name": "<string>",
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z",
    "time_zone": "<string>",
    "send_email": true,
    "content": {
      "id": "<string>",
      "visible": true,
      "type": "stack",
      "blockStyle": {
        "marginBottom": 123,
        "marginRight": 123,
        "marginLeft": 123,
        "marginTop": 123,
        "paddingLeft": 123,
        "paddingRight": 123,
        "paddingTop": 123,
        "paddingBottom": 123,
        "backgroundColor": "<string>",
        "gap": 123,
        "width": 123
      },
      "children": [
        {
          "id": "<string>",
          "visible": true,
          "type": "text",
          "blockStyle": {
            "marginBottom": 123,
            "marginRight": 123,
            "marginLeft": 123,
            "marginTop": 123,
            "paddingLeft": 123,
            "paddingRight": 123,
            "paddingTop": 123,
            "paddingBottom": 123,
            "backgroundColor": "<string>",
            "gap": 123,
            "width": 123
          },
          "tokens": [
            {
              "id": "<string>",
              "type": "textToken",
              "value": "<string>",
              "smartFieldUuid": "<string>",
              "textStyle": {
                "fontSize": 123,
                "color": "<string>",
                "lineHeight": 5
              },
              "href": {
                "text": "<string>",
                "smartFieldUuid": "<string>"
              }
            }
          ],
          "displayName": "<string>"
        }
      ],
      "displayName": "<string>"
    },
    "smart_fields_conditions": [
      [
        {
          "smart_field_id": "<string>",
          "values": [
            "<string>"
          ]
        }
      ]
    ],
    "signature_template_ids": [
      "<string>"
    ]
  }
}
'
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "send_email": true,
    "content": {},
    "smart_fields_conditions": [
      [
        {
          "smart_field_id": "<string>",
          "values": [
            "<string>"
          ]
        }
      ]
    ],
    "signature_template_ids": [
      "<string>"
    ],
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z",
    "time_zone": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
marketing_campaign
object
required

Response

Created

data
object
required