# Upload WhatsApp Business profile picture

> Upload a new profile picture for the WhatsApp Business profile. The image will be uploaded to Meta and set as the profile picture.

`POST https://api.zavu.dev/v1/senders/{senderId}/profile/picture`

Upload a new profile picture for the WhatsApp Business profile. The image will be uploaded to Meta and set as the profile picture.

## Parameters

- `senderId` (path, string, required)

## Body

- `imageUrl` (string<uri>, required): URL of the image to upload.
- `mimeType` (string, required): MIME type of the image. One of: `image/jpeg`, `image/png`.

## Responses

### 200

Profile picture uploaded successfully.

- `success` (boolean, required)
- `profile` (object, required): WhatsApp Business profile information.
  - `about` (string): Short description of the business (max 139 characters).
  - `address` (string): Physical address of the business (max 256 characters).
  - `description` (string): Extended description of the business (max 512 characters).
  - `email` (string<email>): Business email address.
  - `profilePictureUrl` (string<uri>): URL of the business profile picture.
  - `websites` (string<uri>[]): Business website URLs (maximum 2).
  - `vertical` (string): Business category for WhatsApp Business profile. One of: `UNDEFINED`, `OTHER`, `AUTO`, `BEAUTY`, `APPAREL`, `EDU`, `ENTERTAIN`, `EVENT_PLAN`, `FINANCE`, `GROCERY`, `GOVT`, `HOTEL`, `HEALTH`, `NONPROFIT`, `PROF_SERVICES`, `RETAIL`, `TRAVEL`, `RESTAURANT`, `NOT_A_BIZ`.

### 400

Invalid request or sender does not have a WhatsApp Business Account connected.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Sender not found.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 502

WhatsApp (Meta) refused or failed the call, for example an expired access token or a field Meta rejected. `message` carries Meta's reason. Nothing was changed on Zavu's side; fix the cause and retry.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X POST "https://api.zavu.dev/v1/senders/sender_abc123/profile/picture" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "imageUrl": "https://example.com/profile.jpg",
  "mimeType": "image/jpeg"
}'
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.senders.uploadProfilePicture("sender_abc123", {
  imageUrl: "https://example.com/profile.jpg",
  mimeType: "image/jpeg",
});

console.log(result);
```
