Passthrough APIs-Flow Management

📘

The feature is currently in beta mode and is only available to select partners.

Introduction

Today, all the partners of Gupshup use the Gupshup-specific format APIs to send outgoing messages on WhatsApp to their end clients. We currently support two different versions (v1 and v2) of these APIs which are commonly used by the partners.

These APIs need regular maintenance and changes whenever Meta launches a new feature. This impacts sending a message such as a new template type or a new field in the existing payload. Also, many of our partners come from different BSPs who might already be on Meta-specific format for sending a message and hence it becomes difficult for partners to migrate from a different BSP to Gupshup without too many changes on their side.

Hence, Gupshup has now invested in building raw passthrough APIs which will imitate Meta’s format to ensure new features are rolled out faster and facilitate seamless migration of our partners from other BSPs.

Objective

  1. To allow our existing and new partners to send business messages via a new API which imitates the Meta send message format for various types of templates or session messages.
  2. To allow our existing and new partners to set new callback subscriptions for supporting raw incoming messages and other events

Scope

  1. Sending a template message in Meta format
  2. Sending a non-template message in Meta format
  3. Receiving incoming messages and events on a new subscription webhook
  4. Support both prepaid and postpaid billing
  5. Support for media messages

Note: Creation or management of templates in Meta format is out of scope in the current release.

Pre-requisites

  1. Apps should be on Meta Cloud
  2. A new v3 callback subscription is mandatory to receive incoming events in meta format

Impact on existing partners

Existing partners who are using our existing v1 or v2 APIs can also migrate to the new passthrough APIs or can choose to work with both the existing and new APIs in parallel.
All the existing APIs will work with the existing subscriptions and newer APIs will require new v3 subscriptions.

Limitations

  1. Template matching or Optin checks are not performed
  2. Creation of templates in Meta format not supported through these APIs
  3. Not available on the UI
  4. If a customer has subscribed to both v2 and v3 (passthrough) callback subscriptions for incoming messages and events, they will get such events on both callbacks. Customers have to handle the deduplication logic at their end.

Implementation

To consume the passthrough send message APIs, the following steps should have been completed:-

  1. Onboarding on the partner portal to get a partner token.
  2. Create an account on gupshup.io to get an API key and a wallet.
  3. If the partner is on the prepaid model, contact support to convert the wallet to a postpaid.
  4. If the WABA onboarding is through gupshup.io UI.
    1. Use the below APIs to start sending messages after WABA is live.

Flow Management

  1. Create Flow: This API allows the user to create a flow in a Gupshup application by specifying the flow's name and categories. Read how to use the Create Flow API.
  2. Get Flow: To retrieve detailed information about a specific flow, the Get Flow API is used. Read how to use the Get Flow API.
  3. Get All Flow API: To retrieve a list of all flows associated with a specific appID, the Get All Flow API is used. Read how to use the Get All Flow API.
  4. Update Flow: Used to modify an existing flow within an application by providing the app ID and flow ID. Read how to use the Update Flow API.
  5. Get Flow Json: This endpoint is used to retrieve the Json assets of specific app flows. Read how to use the Get Flow Json API.
  6. Get Preview URL: This endpoint is used to retrieve the preview URL for a specific flow in an application. Read how to use the Get Preview URL API.
  7. Delete Flow: Used to delete a specific flow in an application by providing the app ID and flow ID. Successful deletion returns a status of "success" with a true value. Read how to use the Delete Flow API.
  8. Deprecate Flow: Used to deprecate the flow. Read how to use the Deprecate Flow API.
  9. Publish Flow: Used to publish a flow message. Read how to use the Publish Flow API.
  10. Update Flow Json: Used for updating the JSON structure of an existing flow. Read how to use the Update Flow Json API.