Skip to content

Add contacts to broadcast

View .md
POST

Add contacts to a broadcast in batch. Maximum 1000 contacts per request.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • broadcastIdstringrequired

Body

application/json

  • contactsobject[]required

    List of contacts to add (max 1000 per request).

    Limitsmax items 1000
    4 properties
    • recipientstringrequired

      Phone number (E.164) or email address. On a telegram broadcast, the numeric chat ID of someone who has already written to your bot (838360395, or telegram:838360395); a phone number is rejected there, because a bot cannot start a chat.

    • templateVariablesobject

      Per-contact body variables. Key them to match the template body: by position (1, 2, ...) for positional templates, or by name (e.g. customer_name) for named templates. Zavu detects the template's format and sends the correct payload to Meta. Do not mix positional and named keys.

      1 properties
      • {key}string
    • templateButtonVariablesobject

      Per-contact button variables for dynamic URL/OTP buttons. Keys are the button index (0, 1, 2).

      1 properties
      • {key}string
    • templateHeaderVariablesobject

      Per-contact value for a text-header variable, keyed by 1. If omitted, Zavu resolves the header from templateVariables by the header placeholder's name.

      1 properties
      • {key}string

Responses

201Contacts added.
  • addedintegerrequired

    Number of contacts successfully added.

  • duplicatesintegerrequired

    Number of duplicate contacts skipped.

  • invalidintegerrequired

    Number of invalid contacts rejected.

  • errorsobject[]

    Details about invalid contacts.

    2 properties
    • recipientstring
    • reasonstring
400Invalid request or broadcast not in draft status.
  • codestringrequired
  • messagestringrequired
  • detailsobject
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Broadcast not found.
  • codestringrequired
  • messagestringrequired
  • detailsobject