1MSG

Set business encryption public key

POST
/whatsapp_business_encryption

Upload a 2048-bit RSA business public key (PEM) for this channel's phone number. Meta requires a signed key before a Flow with a data endpoint can be published or sent. Only one key is active per number; a new upload replaces the previous key.

Generate the pair on your server and upload only public.pem:

openssl genrsa -out private.pem 2048openssl rsa -in private.pem -pubout -out public.pem

business_public_key must include the -----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- lines. Keep private.pem: it decrypts requests to your Flow endpointUri. Do not send the private key.

After a successful upload, call GET /whatsapp_business_encryption and wait until business_public_key_signature_status is VALID. VALID confirms the signature, not that your endpoint works.

Authorization

JWT token
querytoken<token>

Request Body

application/json
  1. body
business_public_key*string

2048-bit RSA public key in PEM format, including the BEGIN and END lines.

Response Body

Public key uploaded

application/json
  1. response
success?boolean
[key: string]?any
curl -X POST 'https://api.1msg.io/123/whatsapp_business_encryption' \  -H 'Content-Type: application/json' \  -d '{  "business_public_key": "-----BEGIN PUBLIC KEY-----\nYOUR_PUBLIC_KEY\n-----END PUBLIC KEY-----"}'
{  "success": true}