Creates a new GupshupPartnerApiClient instance
Configuration object containing app credentials and options
Adds a phone number to the opt-in list
The phone number to opt-in
Promise resolving to opt-in result
Creates a new subscription
Subscription data to create
Promise resolving to created subscription data
Checks the health status of the API
Promise resolving to health status data
Deletes all subscriptions for the partner app
Promise resolving to deletion result
Deletes a specific subscription
The unique identifier of the subscription to delete
Promise resolving to deletion result
Deletes a template by element name
The element name of the template to delete
Promise resolving to deletion result
Disables button click analytics for a template
The template ID to disable analytics for
Promise resolving to analytics disable result
Downloads media by media ID
The media ID to download
Promise resolving to media data
Updates an existing template
The unique identifier of the template to update
Updated template data
Promise resolving to updated template data
Uploads a file and generates a media ID
The file to upload
The type of the file
Promise resolving to media ID and upload result
Retrieves all subscriptions for the partner app
Promise resolving to subscription data
Gets business profile about information
Promise resolving to business profile about data
Gets business profile details
Promise resolving to business profile data
Gets business profile photo
Promise resolving to business profile photo data
Gets discount information for a specific year and month
The year (YYYY format)
The month (MM format)
Promise resolving to discount data
Gets message limits and ratings
Promise resolving to message limits and ratings data
Gets quality rating information
Promise resolving to quality rating data
Retrieves a specific subscription by ID
The unique identifier of the subscription
Promise resolving to subscription data
Retrieves all templates for the partner app
Promise resolving to array of templates
Gets usage statistics for a date range
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Promise resolving to usage statistics
Gets the status of a user by phone number
The phone number to check
Promise resolving to user status
Gets WABA (WhatsApp Business Account) information
Promise resolving to WABA information
Gets the wallet balance
Promise resolving to wallet balance data
Checks if a phone number is opted in
The phone number to check
Promise resolving to boolean indicating if phone is opted in
Creates a new template
Template creation data
Promise resolving to created template data
Sets the callback URL for webhook notifications
The URL to receive webhook notifications
Promise resolving to callback URL setting result
Updates an existing subscription
The unique identifier of the subscription to update
Updated subscription data
Promise resolving to updated subscription data
Gupshup Partner API Client
Provides methods to interact with the Gupshup Partner API for managing subscriptions, templates, business profiles, media, and other partner-related operations.
Example