---
title: "Set Business Encryption Public Key"
method: POST
path: "/{Version}/{Phone-Number-ID}/whatsapp_business_encryption"
tags: ["Business Encryption"]
---

# Set Business Encryption Public Key

`POST /{Version}/{Phone-Number-ID}/whatsapp_business_encryption`

## Request

- Base URL: `https://graph.facebook.com`
- URL: `https://graph.facebook.com/{Version}/{Phone-Number-ID}/whatsapp_business_encryption`
- Auth: HTTP bearer

Upload and configure a business public key for message payload encryption.

This endpoint accepts a business public key in PEM format, validates it,
and stores it with a cryptographic signature for future use in encrypting
message payloads and data channel requests.

**Use Cases:**
- Initial setup of encryption for WhatsApp Business messaging
- Update existing public key for key rotation
- Enable secure payload encryption for sensitive business communications
- Configure encryption keys for compliance requirements

**Key Requirements:**
- Must be a valid RSA public key in PEM format
- Key must meet Meta's security standards for encryption
- Only one active public key per phone number at a time
- Previous keys are replaced when new ones are uploaded

**Rate Limiting:**
Standard Graph API rate limits apply. Key uploads may have additional
security-related rate limiting to prevent abuse.

## Path parameters

- `Version` string, required
- `Phone-Number-ID` string, required

## Headers

- `User-Agent` string
- `Authorization` string, required

## Request body `multipart/form-data`

- WhatsAppBusinessEncryptionUploadRequest: Request payload for uploading business public key
  - `business_public_key` string, required: The business public key in PEM format to be uploaded and signed. Must be a valid RSA public key that will be used for payload encryption.

## Response `200`

Successfully uploaded and configured business encryption public key

- WhatsAppBusinessEncryptionUploadResponse: Response after successful public key upload
  - `success` boolean, required: Indicates whether the public key was successfully uploaded and signed

## Other responses

- `400`: Bad Request - Invalid parameters or malformed request
- `401`: Unauthorized - Invalid or missing access token
- `403`: Forbidden - Insufficient permissions or access denied
- `404`: Not Found - Phone number ID does not exist or is not accessible
- `422`: Unprocessable Entity - Request parameters are valid but cannot be processed
- `429`: Too Many Requests - Rate limit exceeded
- `500`: Internal Server Error - Unexpected server error

---

[API](https://skmtc.dev/meta/apis/whatsapp-business-messaging.md) - [All operations](https://skmtc.dev/meta/apis/whatsapp-business-messaging/llms.txt) - [OpenAPI document](https://skmtc.dev/meta/apis/whatsapp-business-messaging/revisions/5c1973265369?raw)
