Send Campaign

Send a campaign through an active workspace channel. You can use the template already stored on the campaign or a template specified explicitly in the request.

POST https://api.platica.mx/v1/campaigns/{campaignId}/send

URL parameters

ParameterTypeDescriptionRequirement
campaignIdstringUnique identifier of the campaignrequired

Request examples

Immediate send using the template stored on the campaign

{
  "channelId": "5215512345678",
  "template": {
    "params": ["Juan", "20% de descuento"],
    "sendToProblematic": false,
    "sendToUndeliverable": false
  }
}

Immediate send with a specific template

{
  "channelId": "5215512345678",
  "template": {
    "name": "promo_verano_2026",
    "params": ["Juan", "20% de descuento"],
    "sendToProblematic": false,
    "sendToUndeliverable": false
  }
}

Send with an image and scheduled dates

{
  "channelId": "5215512345678",
  "template": {
    "name": "promo_verano_2026",
    "params": ["Juan"],
    "type": "image",
    "file": "https://example.com/promo.jpg",
    "scheduledDates": [
      "2026-07-01T10:00:00Z",
      "2026-07-08T10:00:00Z"
    ],
    "sendToProblematic": false,
    "sendToUndeliverable": false
  }
}

Send with dynamic buttons

{
  "channelId": "5215512345678",
  "template": {
    "name": "promo_con_enlace",
    "params": ["Juan"],
    "buttons": [
      {
        "index": 0,
        "type": "button",
        "sub_type": "url",
        "text": "Ver oferta",
        "parameters": [
          { "type": "text", "text": "promo2026" }
        ]
      }
    ]
  }
}

Body parameters

ParameterTypeDescriptionRequirement
channelIdstringSENDER channel the campaign is sent from (prefixedChannelId, e.g. wb-123)required
responderAgentIdstringAgent that RESPONDS to campaign replies, decoupled from the channel. If omitted, the channel's defaultAgentId is usedoptional
templateobjectTemplate configuration for the sendrequired

template object

ParameterTypeDescriptionRequirement
namestringName of the template to use. If omitted, the template configured on the campaign is usedoptional
paramsstring[]Values for the template's variable parameters, in orderoptional
typestringType of attached media: "image", "video", or "document"optional
filestringhttp(s) URL of the file to attach. Required when the template needs mediaoptional
buttonsarrayDynamic parameters for the template buttonsoptional
scheduledDatesstring[]Scheduled send dates in ISO 8601 format. Must be future datesoptional
sendToProblematicbooleanWhether to send to contacts with problematic numbersoptional (default false)
sendToUndeliverablebooleanWhether to send to contacts with previous failed deliveriesoptional (default false)

buttons[] object

ParameterTypeDescriptionRequirement
indexnumberIndex of the button in the template (starts at 0)required
typestringComponent type. If omitted, the API uses "button"optional
sub_typestringSubtype: "url", "phone_number", "quick_reply", or "otp"optional
textstringButton text. The API can infer it from the templateoptional
placeholderstringPlaceholder or base value defined in the template for dynamic buttonsoptional
parametersarrayDynamic parameters of the buttonrequired

buttons[].parameters[] object

ParameterTypeDescriptionRequirement
typestringButton parameter typerequired
textstringText value of the parameterrequired
urlstringURL associated with the parameter when applicableoptional
selectedFieldsstring[]Selected fields to map dynamic contentoptional

Response 200 OK

{
  "status": "success",
  "message": "Campaign sent successfully",
  "data": {
    "status": "queued"
  }
}

data contains the response from the upstream sending service, so its structure can vary across workspaces or integrations.

Notes

  • channelId is the SENDER channel. The responding agent is controlled with responderAgentId (decoupled from the channel): you can send from one number and have a specific agent handle replies without changing the agent connected to that channel. If you omit responderAgentId, the channel's defaultAgentId responds.
  • If template.name is omitted, the campaign's saved template is used. If the campaign has no configured template, the send fails with 400.
  • The number of items in params must match exactly the number of variables expected by the template.
  • If you send buttons, the number of buttons and their indexes must exist in the validated template.
  • When the template needs media, file must be a valid http or https URL.
  • All scheduledDates must be in the future at request time.