Create invitation

Changed on

Create a partner invitation link for a client to connect a Meta channel. The client opens the returned url and authorizes with Meta; the resulting sender is created in your project when they finish, and the invitation transitions to completed.

connectionType picks the channel:

  • whatsapp_waba (default): Meta's embedded signup links an official WhatsApp Business Account.
  • messenger: the client picks a Facebook Page they administer; its Messenger inbox (including Marketplace chats) is routed to Zavu.

One invitation connects one channel — create one per channel to onboard a client on several. phoneNumberId and allowedPhoneCountries apply to whatsapp_waba only.

post/v1/invitations

Request

  • Base URL
    https://api.zavu.dev
  • URL
    https://api.zavu.dev/v1/invitations
  • Auth
    HTTP bearer

Request body

clientNamestring

Name of the client being invited.

clientEmailstring email

Email of the client being invited.

clientPhonestring

Phone number of the client in E.164 format.

phoneNumberIdstring

ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided, the client will use this number instead of their own. Only valid when connectionType is whatsapp_waba — sending it with messenger returns 400, since a Facebook Page has no phone number.

expiresInDaysinteger

Number of days until the invitation expires.

allowedPhoneCountriesstring[]

ISO country codes for allowed phone numbers. Only valid when connectionType is whatsapp_waba — sending it with messenger returns 400.

connectionType'whatsapp_waba' | 'messenger'

Which Meta channel the client connects, and how.

  • whatsapp_waba (default): Meta's embedded signup links an official WhatsApp Business Account. Accepts phoneNumberId and allowedPhoneCountries.
  • messenger: the client authorizes with Facebook and picks a Facebook Page they administer. The Page's Messenger inbox — including Marketplace chats — is routed to Zavu. They must be an admin of at least one Page. A Page can only be connected to one Zavu project at a time: if the client picks a Page that another project already connected, the newer connection wins and the older one is disconnected.

One invitation connects one channel. To onboard a client on several channels, create one invitation per channel; each completes into its own sender.

Example request

{
  "clientName": "Acme Corp",
  "clientEmail": "contact@acme.com",
  "clientPhone": "+14155551234",
  "phoneNumberId": "pn_abc123",
  "allowedPhoneCountries": [
    "US",
    "MX"
  ]
}

Response

Invitation created.

Example response

{
  "invitation": {
    "id": "inv_abc123",
    "url": "https://dashboard.zavu.dev/invite/abc123xyz"
  }
}

Changes

    • warning

      added the new failed enum value to the / response property for the response status

    • warning

      added the new messenger enum value to the / response property for the response status

    • info

      added the new messenger enum value to the request property

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

      removed the enum value whatsapp_alt of the request property

    • info

      removed the whatsapp_alt enum value from the / response property for the response status