ChakraHQ APIs
Home
Sign In
Home
Sign In
  1. Flows - Create & Manage
  • API Keys
  • Response Format
  • Inbound Events Webhook
  • How to figure out pluginId and whatsappPhoneNumberId
  • Send Template Messages
    • Send Whatsapp Template Message For Process
      POST
    • Send Whatsapp Template Message For A Phone Number
      POST
    • Send Template Message (Meta API Format)
      POST
  • Send Session Messages
    • WhatsApp Messages API (pass-through)
      POST
    • Send WhatsApp session message (pass-through)
      POST
  • Message Templates - Create & Manage
    • Create WhatsApp Message Template (pass-through)
      POST
    • List WhatsApp Message Templates (pass-through)
      GET
    • Update WhatsApp Message Template (pass-through)
      POST
  • Media - Upload & Manage
    • Upload Public Media
      POST
    • Show Whatsapp Media API
      GET
    • Fetch Whatsapp Media API
      GET
    • Show Whatsapp Media Attachments API
      GET
  • Flows - Create & Manage
    • Set Business Public Key
      POST
    • Get Business Public Key
      GET
  • Leads - Create & Manage
    • Create a lead
      POST
  • Chat & Chat Messages
    • List chats
      POST
    • List chat messages for a chat
      POST
    • List previous messages for a phone number
      POST
  • Platform
    • Process
      • Fetch Process By Id
      • List Processes
      • Create Process
      • Update Process
      • Update Process By Primary Key
      • Delete Process
      • Delete Process By Primary Key Value
      • Bulk Create Process API
      • Bulk Update Process API
    • Task
      • Create Task API
    • User
      • List Users API
      • List Users API (V2)
      • Fetch User API
      • Fetch User API (V2)
      • Update User API
    • Photo
      • Fetch Photo API
      • Upload Photo API
      • Upload Photo API With Id
    • Background Job
      • Fetch Background Job
      • Fetch Background Job Entries API
    • Fetch Config
  • Schemas
    • Whatsapp
      • MappingType
Home
Sign In
Home
Sign In
  1. Flows - Create & Manage

Set Business Public Key

POST
https://api.chakrahq.com/v1/whatsapp/{whatstappApiVersion}/{whatsappPhoneNumberId}/whatsapp_business_encryption
In order to decrypt and encrypt data passed through WhatsApp Flows, every WhatsApp Business Account (WABA) requires a key pair, which needs to be signed for every phone number sending Flows within the WABA.

Generating a 2048-bit RSA Key Pair#

Generate a public and private RSA key pair by typing in the following command in the terminal / console within your operating system (Note: OpenSSL needs to be installed):
The generates 2048-bit RSA key pair encrypted with the password you provided and is written to the private.pem file.
Next, you need to export the RSA public key to a file, which can be accessed within your file system:

Set Business Public Key#

In Postman, when inputting the business public key as a parameter in the Body, select x-www-form-urlencoded. Additionally, the public key needs to be copied in full to work (from ----BEGIN PUBLIC KEY---- and ending with ----END PUBLIC KEY----).

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Body Params application/x-www-form-urlencoded

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.chakrahq.com/v1/whatsapp/v24.0/{{$number.int(min=1)}}/whatsapp_business_encryption' \
--header 'Authorization: Bearer <token>' \
--data-urlencode 'business_public_key=-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtscozA5D825iIPOKhr3U
Lj4DFx4J54z2RUBTklv1Oy3q4M3ZN4uXQbV9/FDe7t/SsGWY1mkHFCLQIbxtY860
dSqXvjwDM/XSqxNFGW+l922elr9tJ0ytCSCvYWlKxPSF5DoMH2VQe+QeKkteJgyO
IP4CO24Cetda437BeXFdEAiK+bCbp5qruPlBwtdyeImqeNXTqNQLLuqXOKJbkFJh
F6m2nTSztBlXOeN6uieKIKR0pY9EkAPNwRjbfJT9qBT8l+SUVlkx9/9kP940Eiqa
rLBU+dCbN5xvm2H7ZtWud+IK9ANNc9RBbDMy0hptPAbVQ47hjUqD8FO9xAw5JVOa
7QIDAQAB
-----END PUBLIC KEY-----'
Response Response Example
{
	"success": true
}
Modified at 2026-01-20 08:34:55
Previous
Show Whatsapp Media Attachments API
Next
Get Business Public Key
Built with