@datafire/whatsapp_local
Client library for WhatsApp Business API
Installation and Usage
npm install --save @datafire/whatsapp_local
let whatsapp_local = require('@datafire/whatsapp_local').create({
bearerAuth: "",
username: "",
password: ""
});
.then(data => {
console.log(data);
});
Description
See https://developers.facebook.com/docs/whatsapp
Actions
RequestCode
Request-Code
whatsapp_local.RequestCode({
"body": {
"cc": "",
"phone_number": "",
"method": "",
"cert": ""
}
}, context)
Input
- input
object
- body required Request-Code-Request-Body
Output
Output schema unknown
SetShards
Set-Shards
whatsapp_local.SetShards({
"body": {
"cc": "",
"phone_number": "",
"shards": 0,
"pin": ""
}
}, context)
Input
- input
object
- body required Set-Shards-Request-Body
Output
Output schema unknown
RegisterAccount
Register-Account
whatsapp_local.RegisterAccount({
"body": {
"code": ""
}
}, context)
Input
- input
object
- body required Register-Account-Request-Body
Output
Output schema unknown
UploadCertificate
Upload-Certificate
whatsapp_local.UploadCertificate({}, context)
Input
- input
object
- body
string
- body
Output
Output schema unknown
DownloadCaCertificate
Download-CA-Certificate
whatsapp_local.DownloadCaCertificate(null, context)
Input
This action has no parameters
Output
- output
string
DeleteWebhookCaCertificate
Delete Webhook CA Certificate
whatsapp_local.DeleteWebhookCaCertificate(null, context)
Input
This action has no parameters
Output
Output schema unknown
DownloadWebhookCaCertificate
Download Webhook CA Certificate
whatsapp_local.DownloadWebhookCaCertificate(null, context)
Input
This action has no parameters
Output
- output
string
UploadWebhookCaCertificate
Upload Webhook CA Certificate
whatsapp_local.UploadWebhookCaCertificate({}, context)
Input
- input
object
- body
string
- body
Output
Output schema unknown
CheckContact
Check-Contact
whatsapp_local.CheckContact({
"body": {
"contacts": []
}
}, context)
Input
- input
object
- body required Check-Contact-Request-Body
Output
- output Check-Contact-Response
GetAllGroups
Get-All-Groups
whatsapp_local.GetAllGroups(null, context)
Input
This action has no parameters
Output
- output Groups-Response
CreateGroup
Create-Group
whatsapp_local.CreateGroup({
"body": {
"subject": ""
}
}, context)
Input
- input
object
- body required Create-Group-Request-Body
Output
- output Groups-Response
GetGroupInfo
Get-Group-Info
whatsapp_local.GetGroupInfo({
"GroupId": ""
}, context)
Input
- input
object
- GroupId required
string
- GroupId required
Output
- output Group-Response
UpdateGroupInfo
Update-Group-Info
whatsapp_local.UpdateGroupInfo({
"GroupId": "",
"body": {
"subject": ""
}
}, context)
Input
- input
object
- GroupId required
string
- body required Update-Group-Info-Request-Body
- GroupId required
Output
Output schema unknown
DemoteGroupAdmin
Demote-Group-Admin
whatsapp_local.DemoteGroupAdmin({
"GroupId": "",
"body": {
"wa_ids": []
}
}, context)
Input
- input
object
- GroupId required
string
- body required Group-Admin-Request-Body
- GroupId required
Output
Output schema unknown
PromoteToGroupAdmin
Promote-To-Group-Admin
whatsapp_local.PromoteToGroupAdmin({
"GroupId": "",
"body": {
"wa_ids": []
}
}, context)
Input
- input
object
- GroupId required
string
- body required Group-Admin-Request-Body
- GroupId required
Output
Output schema unknown
DeleteGroupIcon
Delete-Group-Icon
whatsapp_local.DeleteGroupIcon({
"GroupId": "",
"File": ""
}, context)
Input
- input
object
- GroupId required
string
- File required
string
- GroupId required
Output
Output schema unknown
GetGroupIconBinary
Get-Group-Icon-Binary
whatsapp_local.GetGroupIconBinary({
"GroupId": ""
}, context)
Input
- input
object
- GroupId required
string
- GroupId required
Output
Output schema unknown
SetGroupIcon
Set-Group-Icon
whatsapp_local.SetGroupIcon({
"GroupId": "",
"File": ""
}, context)
Input
- input
object
- GroupId required
string
- File required
string
- GroupId required
Output
Output schema unknown
DeleteGroupInvite
Delete-Group-Invite
whatsapp_local.DeleteGroupInvite({
"GroupId": ""
}, context)
Input
- input
object
- GroupId required
string
- GroupId required
Output
Output schema unknown
GetGroupInvite
Get-Group-Invite
whatsapp_local.GetGroupInvite({
"GroupId": ""
}, context)
Input
- input
object
- GroupId required
string
- GroupId required
Output
- output Group-Invite-Response
LeaveGroup
Leave-Group
whatsapp_local.LeaveGroup({
"GroupId": ""
}, context)
Input
- input
object
- GroupId required
string
- GroupId required
Output
Output schema unknown
RemoveGroupParticipant
Remove-Group-Participant
whatsapp_local.RemoveGroupParticipant({
"GroupId": "",
"body": {
"wa_ids": []
}
}, context)
Input
- input
object
- GroupId required
string
- body required Remove-Group-Participant-Request-Body
- GroupId required
Output
Output schema unknown
CheckHealth
Check-Health
whatsapp_local.CheckHealth(null, context)
Input
This action has no parameters
Output
Output schema unknown
UploadMedia
Upload-Media
whatsapp_local.UploadMedia({
"body": ""
}, context)
Input
- input
object
- body required
string
- body required
Output
- output Upload-Media-Response
DeleteMedia
Delete-Media
whatsapp_local.DeleteMedia({
"MediaId": ""
}, context)
Input
- input
object
- MediaId required
string
- MediaId required
Output
Output schema unknown
DownloadMedia
Download-Media
whatsapp_local.DownloadMedia({
"MediaId": ""
}, context)
Input
- input
object
- MediaId required
string
- MediaId required
Output
Output schema unknown
SendMessage
Send-Message
whatsapp_local.SendMessage({
"body": {
"to": ""
}
}, context)
Input
- input
object
- body required Send-Message-Request-Body
Output
- output Message-Response
MarkMessageAsRead
Mark-Message-As-Read
whatsapp_local.MarkMessageAsRead({
"MessageID": "",
"body": {
"status": ""
}
}, context)
Input
- input
object
- MessageID required
string
: Message ID from Webhook - body required Mark-Message-As-Read-Request-Body
- MessageID required
Output
Output schema unknown
GetMetrics
Get-Metrics (since v2.21.3)
whatsapp_local.GetMetrics({}, context)
Input
- input
object
- format
string
- format
Output
- output
object
DisableTwoStep
Disable-Two-Step
whatsapp_local.DisableTwoStep(null, context)
Input
This action has no parameters
Output
Output schema unknown
EnableTwoStep
Enable-Two-Step
whatsapp_local.EnableTwoStep({
"body": {
"pin": ""
}
}, context)
Input
- input
object
- body required Enable-Two-Step-Request-Body
Output
Output schema unknown
ResetApplicationSettings
Reset-Application-Settings
whatsapp_local.ResetApplicationSettings(null, context)
Input
This action has no parameters
Output
Output schema unknown
GetApplicationSettings
Get-Application-Settings
whatsapp_local.GetApplicationSettings(null, context)
Input
This action has no parameters
Output
- output Application-Settings
UpdateApplicationSettings
If a field is not present in the request, no change is made to that setting. For example, if on_call_pager is not sent with the request, the existing configuration for on_call_pager is unchanged.
whatsapp_local.UpdateApplicationSettings({
"body": {}
}, context)
Input
- input
object
- body required Application-Settings
Output
- output Response
GetMediaProviders
Get-Media-Providers
whatsapp_local.GetMediaProviders(null, context)
Input
This action has no parameters
Output
- output Get-Media-Providers-Response
UpdateMediaProviders
Update-Media-Providers
whatsapp_local.UpdateMediaProviders({
"body": []
}, context)
Input
- input
object
- body required
array
- items Media-Provider
- body required
Output
Output schema unknown
DeleteMediaProviders
Delete-Media-Providers
whatsapp_local.DeleteMediaProviders({
"ProviderName": ""
}, context)
Input
- input
object
- ProviderName required
string
: Provider Name
- ProviderName required
Output
Output schema unknown
BackupSettings
Backup-Settings
whatsapp_local.BackupSettings({
"body": {
"password": ""
}
}, context)
Input
- input
object
- body required Backup-Settings-Request-Body
Output
- output Backup-Settings-Response
GetBusinessProfile
Get-Business-Profile
whatsapp_local.GetBusinessProfile(null, context)
Input
This action has no parameters
Output
updateBusinessProfile
Update-Business-Profile
whatsapp_local.updateBusinessProfile({
"body": {
"address": "",
"description": "",
"email": "",
"vertical": "",
"websites": []
}
}, context)
Input
- input
object
- body required Business-Profile
Output
Output schema unknown
GetProfileAbout
Get-Profile-About
whatsapp_local.GetProfileAbout(null, context)
Input
This action has no parameters
Output
- output Get-Profile-About-Response
UpdateProfileAbout
Update-Profile-About
whatsapp_local.UpdateProfileAbout({
"body": {
"text": ""
}
}, context)
Input
- input
object
- body required Profile-About
Output
Output schema unknown
DeleteProfilePhoto
Delete-Profile-Photo
whatsapp_local.DeleteProfilePhoto(null, context)
Input
This action has no parameters
Output
Output schema unknown
GetProfilePhoto
Get-Profile-Photo
whatsapp_local.GetProfilePhoto({}, context)
Input
- input
object
- format
string
- format
Output
- output Get-Profile-Photo-Response
UpdateProfilePhoto
Update-Profile-Photo
whatsapp_local.UpdateProfilePhoto({
"File": ""
}, context)
Input
- input
object
- File required
string
- File required
Output
Output schema unknown
RestoreSettings
Restore-Settings
whatsapp_local.RestoreSettings({
"body": {
"password": "",
"data": ""
}
}, context)
Input
- input
object
- body required Restore-Settings-Request-Body
Output
Output schema unknown
GetAppStats
Get-App-Stats
whatsapp_local.GetAppStats({}, context)
Input
- input
object
- format
string
- format
Output
- output
object
GetDbStats
Get-DB-Stats
whatsapp_local.GetDbStats({}, context)
Input
- input
object
- format
string
- format
Output
- output
object
GetSupportInfo
Get-Support-Info
whatsapp_local.GetSupportInfo(null, context)
Input
This action has no parameters
Output
- output
object
CreateUser
Create-User
whatsapp_local.CreateUser({
"body": {
"username": "",
"password": ""
}
}, context)
Input
- input
object
- body required Create-User-Request-Body
Output
- output User-Response
LoginUser
Login-User
whatsapp_local.LoginUser({}, context)
Input
- input
object
Output
- output User-Login-Response
LogoutUser
Logout-User
whatsapp_local.LogoutUser(null, context)
Input
This action has no parameters
Output
Output schema unknown
DeleteUser
Delete-User
whatsapp_local.DeleteUser({
"UserUsername": ""
}, context)
Input
- input
object
- UserUsername required
string
- UserUsername required
Output
- output User-Response
GetUser
Get-User
whatsapp_local.GetUser({
"UserUsername": ""
}, context)
Input
- input
object
- UserUsername required
string
- UserUsername required
Output
- output Detailed-User-Response
UpdateUser
Update-User
whatsapp_local.UpdateUser({
"UserUsername": "",
"body": {
"password": ""
}
}, context)
Input
- input
object
- UserUsername required
string
- body required Update-User-Request-Body
- UserUsername required
Output
- output User-Response
Definitions
Address
- Address
object
- city required
string
: City name - country required
string
: Full country name - country_code required
string
: Two-letter country abbreviation - state required
string
: State abbreviation - street required
string
: Street number and name - type required
string
: Standard Values: HOME, WORK - zip required
string
: ZIP code
- city required
Application-Settings
- Update-Application-Settings-Request-Body
object
- callback_backoff_delay_ms
string
: Backoff delay for a failed callback in milliseconds - callback_persist
boolean
: Stores callbacks on disk until they are successfully acknowledged by the Webhook or not. Restart required. - heartbeat_interval
integer
: Multiconnect: Interval of the Master node monitoring of Coreapp nodes in seconds - max_callback_backoff_delay_ms
string
: Maximum delay for a failed callback in milliseconds - media Media
- on_call_pager
string
: Set to valid WhatsApp Group with users who wish to see alerts for critical errors and messages. - pass_through
boolean
: When true, removes messages from the local database after they are delivered to or read by the recipient. When false, saves all messages on local storage until they are explicitly deleted. - sent_status
boolean
: Receive a notification that a message is sent to server. When true, you will receive a message indicating that a message has been sent. If false (default), you will not receive notification. - unhealthy_interval
integer
: Multiconnect: Maximum amount of seconds a Master node waits for a Coreapp node to respond to a heartbeat before considering it unhealthy and starting the failover process. - webhooks Webhooks
- callback_backoff_delay_ms
Audio
- Audio
object
: The media object containing audio
AudioById
- AudioById
object
- id required
string
- id required
AudioByProvider
- AudioByProvider
object
- link required
string
- provider required Provider
- link required
Backup-Settings
- Root Type for Backup-Settings
object
- data
string
: The data that has been backed up, encrypted for security.
- data
Backup-Settings-Request-Body
- Backup-Settings-Request
object
- password required
string
: Used to encrypt backup data for security
- password required
Backup-Settings-Response
- Root Type for Backup-Settings-Response
object
: Save the data value as that will be used along with your password to restore the information.- settings Backup-Settings
Basic
- Root Type for Basic
object
- password
string
- username
string
- password
Business-Profile
- Set-Business-Profile-Request
object
- address required
string
: Address of the business - description required
string
: Description of the business - email required
string
: Email address to contact the business - vertical required
string
: Industry of the business - websites required
array
: URLs associated with business (e.g., website, Facebook page, Instagram)- items
string
- items
- address required
Business-Settings
- Root Type for Business-Settings
object
- business Business-Settings-Business
Business-Settings-Business
- Root Type for Business-Settings-Business
object
- profile Business-Profile
Check-Contact
- Check-Contact
object
- input
string
: The value you sent in the contacts field of the JSON request. - status
string
(values: processing, valid, invalid): Status of the user. - wa_id
string
: WhatsApp user identifier that can be used in other API calls. Only returned if the status is valid.
- input
Check-Contact-Request-Body
- Check-Contact-Request
object
- blocking
string
(values: no_wait, wait): Blocking determines whether the request should wait for the processing to complete (synchronous) or not (asynchronous). - contacts required
array
: Array of contact phone numbers. The numbers can be in any standard telephone number format.- items
string
- items
- blocking
Check-Contact-Response
- Check-Contact-Response
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- contacts
array
- items Check-Contact
- errors
Check-Health-Response
- Root Type for Check-Health-Response
object
Config
Config-Basic
- Config
object
- basic Basic
Config-Bearer
- Config
object
- bearer required
string
- bearer required
Contact
- Contact
object
Create-Group-Request-Body
- Create-Group-Request
object
- subject required
string
- subject required
Create-User-Request-Body
- Create-User-Request
object
- password required
string
: username - username required
string
: password
- password required
Currency
- Currency
object
- amount_1000 required
integer
- currency_code required
string
- amount_1000 required
Date-Time-Component
- Date-Time-Component
object
: Date/time by component- day_of_month
integer
: The day of month - day_of_week
integer
(values: 1, 2, 3, 4, 5, 6, 7): Both strings and numbers are accepted. If different from the value derived from the date (if specified), use the derived value. - hour
integer
: The hour - minute
integer
: The minute - month
integer
: The month - year
integer
: The year
- day_of_month
Date-Time-Object
- Date-Time
object
: The Whatsapp Business API Client will attempt to format the date/time based on a specified localization.- component Date-Time-Component
- unix_epoch Date-Time-Unix-Epoch
Date-Time-Unix-Epoch
- Date-Time-Unix-Epoch
object
: Date/time by Unix epoch- timestamp
integer
: Epoch timestamp in seconds
- timestamp
Detailed-User-Response
- Root Type for Detailed-User-Response
object
Detailed-User-Response-Item
- Root Type for Detailed-Response-Item
object
- ROLES User-Role
- username
string
Document
- Document
object
: The media object containing a document
DocumentById
- Document
object
- caption required
string
- filename required
string
- id required
string
- caption required
DocumentByProvider
- Document1
object
- caption required
string
- filename required
string
- link required
string
- provider required Provider
- caption required
- Email
object
- email required
string
- type required
string
- email required
Enable-Two-Step-Request-Body
- Enable-Two-Step-Request
object
- pin required
string
- pin required
Error
- Error
object
- code
integer
: See the https://developers.facebook.com/docs/whatsapp/api/errors for more information. - details
string
: error detail - href
string
: location for error detail - title
string
: error title
- code
Gateway-Node-Status
- Root Type for Gateway-Node-Status
object
- gateway_status
string
- role
string
(values: primary_master, secondary_master, coreapp)
- gateway_status
Gateway-Status
- Gateway-Status
string
(values: connected, connecting, disconnected, uninitialized, unregistered)
Get-Business-Profile-Response
- Root Type for Get-Business-Profile-Response
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- settings Business-Settings
- errors
Get-Media-Providers-Response
- Root Type for Get-Media-Providers-Response
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- settings Media-Provider-Settings
- errors
Get-Profile-About-Response
- Root Type for Get-Profile-About-Response
object
- settings Profile-About-Settings
Get-Profile-Photo-Response
- Root Type for Get-Profile-Photo-Response
object
- settings Profile-Photo-Settings
Group
- Groups-Response-Item
object
- creation_time
integer
: timestamp - id
string
- creation_time
Group-Admin-Request-Body
- Group-Admin-Request
object
- wa_ids required
array
: The WhatsApp IDs of the people to be added or removed as group admins- items
string
- items
- wa_ids required
Group-Info
- Group-Response-Item
object
- admins
array
: Group administrators- items
string
- items
- creation_time
integer
: Group creation time - creator
string
: ID of the creator of this group - participants
array
: Participants of the group- items
string
- items
- subject
string
: Subject of the group
- admins
Group-Invite
- Group-Invite
object
- link
string
- link
Group-Invite-Response
- Group-Invite-Response
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- groups
array
- items Group-Invite
- errors
Group-Response
- Group-Response
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- groups
array
- items Group-Info
- errors
Groups-Response
- GroupsResponse
object
Hsm
- Hsm
object
: The containing element for the message content — Indicates that the message is highly structured. Parameters contained within provide the structure.- element_name required
string
: The element name that indicates which template to use within the namespace - language required Language
- localizable_params required
array
: This field is an array of values to apply to variables in the template- items LocalizableParam
- namespace required
string
: The namespace that will be used
- element_name required
Image
- Image
object
: The media object containing an image
ImageById
- ImageById
object
- caption required
string
- id required
string
- caption required
ImageByProvider
- ImageByProvider
object
- caption required
string
- link required
string
- provider required Provider
- caption required
Language
- Language
object
- code required
string
: The code of the language or locale to use — Accepts both language and language_locale formats (e.g., en and en_US). - policy required
string
(values: fallback, deterministic): The language policy the message should follow
- code required
LocalizableParam
- LocalizableParam
object
- currency Currency
- date_time Date-Time-Object
- default required
string
: Default text if localization fails
Location
- Location
object
- address required
string
: Address of the location. Only displayed if name is present. - latitude required
string
: Latitude of the location - longitude required
string
: Longitude of the location - name required
string
: Name of the location
- address required
Login-Admin-Request-Body
- Login-Admin-Request
object
- new_password required
string
- new_password required
Mark-Message-As-Read-Request-Body
- Mark-Message-As-Read-Request
object
- status required
string
- status required
Media
- Media
object
- auto_download required
array
: An array specifying which types of media to automatically download.- items
string
(values: audio, document, voice, video, image.)
- items
- auto_download required
Media-Provider
- Update-Media-Providers-Request
object
- config Config
- name
string
: The name for the provider - type
string
: The type of provider
Media-Provider-Settings
- Root Type for Settings
object
- application Media-Provider-Settings-Application
Media-Provider-Settings-Application
- Root Type for Settings-Application
object
Media-Provider-Settings-Application-Media
- Root Type for Settings-Application-Media
object
- providers
array
- items Media-Provider
- providers
Message
- Message
object
- id
string
- id
Message-Context
- Root Type for Message-Context
object
- from
string
: Sender Whatsapp id of context-message - group_id
string
: GroupId of context message - id
string
: message id - mentions
array
: Whats app ids- items
string
- items
- from
Message-Response
- Message-Response
object
Message-Type
- Message-Type
string
(values: audio, contacts, document, hsm, image, location, text, video, voice, unknown): type of the message
Meta
- Meta
object
: Contains generic information such as WhatsApp Business API Client version.- api_status
string
(values: deprecated, experimental, stable) - version
string
- api_status
Name
- Name
object
: Full contact name- first_name
string
: First name - formatted_name required
string
: Full name as it normally appears - last_name
string
: Last name - prefix
string
: Name preffix - suffix
string
: Name suffix
- first_name
Org
- Org
object
: Contact organization information- company required
string
: Name of the contact's company - department
string
: Name of the contact's department - title
string
: Contact's business title
- company required
Phone
- Phone
object
- phone
string
- type
string
: Standard Values: CELL, MAIN, IPHONE, HOME, WORK - wa_id
string
: WhatsApp ID
- phone
Profile-About
- Set-Profile-About-Request
object
- text required
string
: Text to display in your profile's About section
- text required
Profile-About-Settings
- Root Type for Profile-About-Settings
object
- profile Profile-About-Settings-Profile
Profile-About-Settings-Profile
- Root Type for About-XXX
object
- about Profile-About
Profile-Photo-Settings
- Root Type for Profile-Photo-Settings
object
- profile
object
- photo
object
- link
string
- link
- photo
- profile
Profile-Photo-Settings-Profile
- Root Type for Profile-Photo-Settings-Profile
object
Profile-Photo-Settings-Profile-Photo
- Root Type for Profile-Photo-Settings-Profile-Photo
object
- link
string
- link
Provider
- Provider
object
- name required
string
- name required
Register-Account-Request-Body
- Register-Account-Request
object
- code required
string
- code required
Remove-Group-Participant-Request-Body
- Remove-Group-Participant-Request
object
- wa_ids required
array
- items
string
- items
- wa_ids required
Request-Code-Account
- Root Type for Request-Code-Account
object
- vname
string
- vname
Request-Code-Request-Body
- Request-Code-Request
object
- cc required
string
: Numerical country code for the phone number you are registering - cert required
string
: Base64-encoded Verified Name certificate - method required
string
(values: sms, voice): Method of receiving your registration code - phone_number required
string
: Phone number you are registering, without the country code or plus symbol (+) - pin
string
: Existing 6-digit PIN — This is only required when two-factor verification is enabled on this account.
- cc required
Request-Code-Response
- Root Type for Request-Code-Response
object
- account
array
- items Request-Code-Account
- account
Response
- Response
object
Restore-Settings-Request-Body
- Restore-Settings-Request
object
- data required
string
: The data that was returned by the /v1/settings/backup API call - password required
string
: The password you used in the /v1/settings/backup API call to encrypt the backup data
- data required
Send-Message-Request-Body
- Send-Text-Message-Request
object
- audio Audio
- contacts
array
- items Contact
- document Document
- hsm Hsm
- image Image
- location Location
- preview_url
boolean
: Specifying preview_url in the request is optional when not including a URL in your message. - recipient_type
string
(values: individual, group): Determines whether the recipient is an individual or a group - text Text
- to required
string
: When recipient_type is individual, this field is the WhatsApp ID (phone number) returned from contacts endpoint. When recipient_type is group, this field is the WhatsApp group ID. - ttl
object
- type Message-Type
- video Video
Set-Shards-Request-Body
- Set-Shards-Request
object
- cc required
string
- phone_number required
string
- pin required
string
- shards required
integer
(values: 1, 2, 4, 8, 16, 32)
- cc required
Text
- Text
object
- body required
string
- body required
Update-Group-Info-Request-Body
- Update-Group-Info-Request
object
- subject required
string
- subject required
Update-User-Request-Body
- Update-User-Request
object
- password required
string
: password
- password required
Upload-Media
- Root Type for Upload-Media
object
- id
string
- id
Upload-Media-Response
- Root Type for Upload-Media-Response
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- media
array
- items Upload-Media
- errors
Url
- Root Type for Url
object
: Standard Values: HOME, WORK- type
string
: Standard Values: HOME, WORK - url
string
: URL
- type
User-Login-Response
- UserLoginResponse
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- users
array
- items User-Login-Response-Item
- errors
User-Login-Response-Item
- UserLoginResponseItem
object
- expires_after
string
: Token expiration timestamp. By default, this is 7 days. - token
string
: Authentication token to be used for all other WhatsApp Business API calls. The token must be sent in the authorization header in the format:
- expires_after
User-Response
- Root Type for User-Create-Response
object
- errors
array
: Only returned with a failed request. Contains an array of error objects that are present when there is an error.- items Error
- meta Meta
- users
array
- items User-Response-Item
- errors
User-Response-Item
- Root Type for User-Create-Response-Item
object
- username
string
- username
User-Role
- User-Role
string
(values: ROLE_ADMIN, ROLE_USER)
Video
- Video
object
: The media object containing a video
VideoById
- VideoById
object
- caption required
string
- id required
string
- caption required
VideoByProvider
- ByProvider
object
- caption required
string
- link required
string
- provider required Provider
- caption required
Webhook-Audio
- Root Type for Webhook-Audio
object
- caption
string
: Optional. Only present if specified. - file
string
: Absolute filename and location on media volume. This parameter is deprecated. - filename
string
: Filename on the sender's device. This will only be present in audio and document media messages. - id
string
: ID of the media. Can be used to delete the media if stored locally on the client. - link
string
- mime_type
string
: Mime type of media - sha256
string
: Checksum
- caption
Webhook-Contact
- Root Type for Webhook-Contact
object
- profile Webhook-Contact-Profile
- wa_id
string
: The WhatsApp ID of the contact
Webhook-Contact-Profile
- Root Type for Webhook-Contact-Profile
object
- name
string
: Optional. As of v2.21.4, contains the sender's profile name.
- name
Webhook-Document
- Root Type for Webhook-Document
object
- caption
string
: Optional. Only present if specified. - file
string
: Absolute filename and location on media volume. This parameter is deprecated. - filename
string
: Filename on the sender's device. This will only be present in audio and document media messages. - id
string
: ID of the media. Can be used to delete the media if stored locally on the client. - link
string
- mime_type
string
: Mime type of media - sha256
string
: Checksum
- caption
Webhook-Event
- Root Type for Webhook-Event
object
- contacts
array
- items Webhook-Contact
- errors
array
- items Error
- messages
array
- items Webhook-Message
- statuses
array
- items Webhook-Status
- contacts
Webhook-Image
- Root Type for Webhook-Image
object
- caption
string
: Optional. Only present if specified. - file
string
: Absolute filename and location on media volume. This parameter is deprecated. - id
string
: ID of the media. Can be used to delete the media if stored locally on the client. - link
string
- mime_type
string
: Mime type of media - sha256
string
: Checksum
- caption
Webhook-Location
- Root Type for Webhook-Location
object
- address
string
: Address of the location - latitude
number
: Latitude of location being sent - longitude
number
: Longitude of location being sent - name
string
: Name of the location - url
string
: URL for the website where the user downloaded the location information
- address
Webhook-Message
- Root Type for Webhook-Message
object
- audio Webhook-Audio
- contacts
array
- items Contact
- context Message-Context
- document Webhook-Document
- errors
array
- items Error
- from
string
: WhatsApp ID of the sender - group_id
string
: Optional. WhatsApp group ID - id
string
: Message ID - image Webhook-Image
- location Webhook-Location
- system Webhook-System
- text Webhook-Text
- timestamp
string
: Message received timestamp - type Message-Type
- video Webhook-Video
- voice Webhook-Voice
Webhook-Status
- Root Type for Webhook-Status
object
- errors
array
- items Error
- id
string
: Message ID - recipient_id
string
: WhatsApp ID of recipient - status
string
(values: sent, delivered, read, failed, deleted): Status of message - timestamp
string
: Timestamp of the status message
- errors
Webhook-System
- Root Type for Webhook-System
object
- body
string
- type
string
(values: group_created, group_user_promoted, group_user_demoted, group_user_joined, group_user_left, group_subject_changed, group_description_changed, group_icon_changed, group_icon_deleted, group_invite_link_revoked, user_identity_changed, group_user_changed_number, group_error_fetching_photo, group_error_adding_users, group_error_adding_user, group_error_full_adding_users, group_error_removing_user, broadcast_list_created, group_ended, group_error_blocked_adding_user)
- body
Webhook-Text
- Root Type for Webhook-Text
object
- body
string
: Message text
- body
Webhook-Video
- Root Type for Webhook-Video
object
- caption
string
: Optional. Only present if specified. - file
string
: Absolute filename and location on media volume. This parameter is deprecated. - id
string
: ID of the media. Can be used to delete the media if stored locally on the client. - link
string
- mime_type
string
: Mime type of media - sha256
string
: Checksum
- caption
Webhook-Voice
- Root Type for Webhook-Voice
object
- caption
string
: Optional. Only present if specified. - file
string
: Absolute filename and location on media volume. This parameter is deprecated. - id
string
: ID of the media. Can be used to delete the media if stored locally on the client. - link
string
- mime_type
string
: Mime type of media - sha256
string
: Checksum
- caption
Webhooks
- Webhooks
object
- max_concurrent_requests
integer
(values: 6, 12, 18, 24): Configures the maximum number of inflight callback requests that are sent out. Can be set to 6 (default), 12, 18, or 24. - url
string
: Inbound and outbound notifications are routed to this URL. A HTTPS-based endpoint is required; HTTP will not work.
- max_concurrent_requests