---
title: "Upload WhatsApp sender public key"
method: POST
path: "/whatsapp/1/senders/{sender}/public-key"
tags: ["channels", "whatsapp", "whatsapp-service-management", "whatsapp-sender-management"]
---

# Upload WhatsApp sender public key

`POST /whatsapp/1/senders/{sender}/public-key`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/whatsapp/1/senders/{sender}/public-key`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Uploads a public key for WhatsApp encryption. The public key enables
            end-to-end encrypted data exchange with WhatsApp, such as in WhatsApp Flows.
            Previous keys are replaced when new ones are uploaded using this endpoint.

## Path parameters

- `sender` string, required

## Request body `multipart/form-data`

- 6a832d7980b0224fa17e623a753d9dcd3d97aedf6ae653c996ab303ad0c7f980UploadKeyApiDoc
  - `file` string, binary, required: Multipart form data containing the public key file. The file must be in PEM format with a 2048-bit RSA key and include the appropriate header and footer lines. Example file content: `----BEGIN PUBLIC KEY-----\n MIIBIjAN... \n ----END PUBLIC

## Response `204`

Public key uploaded successfully.

## Other responses

- `400`: Bad request.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Sender not found.
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
