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": "wb-123456789",
  "template": {
    "params": ["Juan", "20% de descuento"],
    "sendToProblematic": false,
    "sendToUndeliverable": false
  }
}

Immediate send with a specific template

{
  "channelId": "wb-123456789",
  "responderAgentId": "agent_123",
  "template": {
    "name": "promo_verano_2026",
    "params": ["Juan", "20% de descuento"],
    "sendToProblematic": false,
    "sendToUndeliverable": false
  }
}

Send with an image and scheduled dates

{
  "channelId": "wb-123456789",
  "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": "wb-123456789",
  "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 (prefixedChannelId recommended, e.g. wb-123; legacy phone/ID accepted)required
responderAgentIdstringOptional responding agent. The agent does not need to own the sender channeloptional
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. Legacy phone numbers and IDs remain accepted and are normalized to the canonical channel.
  • responderAgentId is independent from the channel. When omitted with a canonical channel, new conversations start initiated and unassigned. channel.defaultAgentId is not inherited. A legacy agent-phone identifier still preserves that inferred agent.
  • Reused active conversations keep their current agent.
  • Contacts with status: "blocked" are always excluded, even when sendToUndeliverable is true. If the entire audience is blocked, the API returns 409.
  • 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.