# Business profiles

## Endpoints

- `GET /graph/whatsapp/{version}/{phoneNumberId}/whatsapp_business_profile`: [Get business profile](https://docs.polymorfa.com/api/graph/business-profiles/get-business-profile)
- `POST /graph/whatsapp/{version}/{phoneNumberId}/whatsapp_business_profile`: [Update saved business profile](https://docs.polymorfa.com/api/graph/business-profiles/update-saved-business-profile)

## The business profile object

### Attributes

- `messaging_product` (string, required). Messaging product associated with this Graph API object.
- `about` (string). Specifies about for this graph graph business profile.
- `address` (string). Specifies address for this graph graph business profile.
- `description` (string). Human-readable description of this resource.
- `email` (string). Email address associated with this resource.
- `profile_picture_url` (string). URL for the profile picture.
- `websites` (array of string). Websites associated with this graph graph business profile.
- `vertical` (string). Specifies vertical for this graph graph business profile.
```json
{
  "messaging_product": "string",
  "about": "string",
  "address": "string",
  "description": "string",
  "email": "string",
  "profile_picture_url": "string",
  "websites": [
    "string"
  ],
  "vertical": "string"
}
```

## Get business profile

`GET https://api.polymorfa.com/graph/whatsapp/{version}/{phoneNumberId}/whatsapp_business_profile` (Graph API)

Required permission: `sessions:read`

**Protocols:** Linked Device API

**Required scope:** `sessions:read`

Linked-device and simulated numbers return the saved profile. A real Meta Cloud API number returns capability error `131026`; this route does not read its provider profile.

### Path parameters

- `version` (string, required). Specifies version for this path parameter.
- `phoneNumberId` (string, required). Identifier for the phone number.

### Request

```bash
curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/whatsapp_business_profile" \
  -H "Authorization: Bearer <POLYMORFA_API_KEY>"
```

### Responses

#### 200

Business profile
- `data` (array of object, required). Structured data carried by this object.
  - `messaging_product` (string, required). Messaging product associated with this Graph API object.
  - `about` (string). Specifies about for this graph graph business profile.
  - `address` (string). Specifies address for this graph graph business profile.
  - `description` (string). Human-readable description of this resource.
  - `email` (string). Email address associated with this resource.
  - `profile_picture_url` (string). URL for the profile picture.
  - `websites` (array of string). Websites associated with this graph graph business profile.
  - `vertical` (string). Specifies vertical for this graph graph business profile.

Headers:

- `X-RateLimit-Limit` (integer, min 1). Team request quota per rolling minute, when the per-team request limiter applies.
- `X-RateLimit-Remaining` (integer, min 0). Requests left in the per-team quota; zero when this limiter rejects the request.
- `X-RateLimit-Reset` (integer, min 0). Unix timestamp in seconds when the oldest counted request leaves the rolling window, when the per-team request limiter applies. Follow Retry-After on a rejected request.

```json
{
  "data": [
    {
      "messaging_product": "string"
    }
  ]
}
```

#### 400

Bad request
- `error` (object, required). Error details returned when the operation fails.
  - `message` (string, required). Human-readable message associated with this result.
  - `type` (string, required). Type discriminator for this object.
  - `code` (number, required). Stable machine-readable code for this result.
  - `error_subcode` (number). Machine-readable error subcode for this error.
  - `error_data` (any, nullable). Specifies error data for this error.
  - `fbtrace_id` (string, required). Identifier for the fbtrace.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 401

Unauthenticated
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 403

Permission error
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 404

Object does not exist
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 429

Rate limited
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 500

Internal error
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

## Update saved business profile

`POST https://api.polymorfa.com/graph/whatsapp/{version}/{phoneNumberId}/whatsapp_business_profile` (Graph API)

Required permission: `sessions:manage`

**Protocols:** Linked Device API

**Required scope:** `sessions:manage`

Linked-device and simulated numbers update the saved profile. A real Meta Cloud API number returns capability error `131026` without saving the request; this route does not update its provider profile.

### Path parameters

- `version` (string, required). Specifies version for this path parameter.
- `phoneNumberId` (string, required). Identifier for the phone number.

### Body

- `messaging_product` (string). Messaging product associated with this Graph API object.
- `about` (string). Specifies about for this graph graph business profile update request.
- `address` (string). Specifies address for this graph graph business profile update request.
- `description` (string). Human-readable description of this resource.
- `email` (string). Email address associated with this resource.
- `profile_picture_handle` (string). Specifies profile picture handle for this graph graph business profile update request.
- `websites` (array of string, max items 2). Websites associated with this graph graph business profile update request.
- `vertical` (string). Specifies vertical for this graph graph business profile update request.

### Request

```bash
curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/whatsapp_business_profile" \
  -H "Authorization: Bearer <POLYMORFA_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "messaging_product": "string",
  "about": "string",
  "address": "string",
  "description": "string",
  "email": "string",
  "profile_picture_handle": "string",
  "websites": [
    "string"
  ],
  "vertical": "string"
}'
```

### Responses

#### 200

Updated
- `success` (boolean, required). Whether the request succeeded.

Headers:

- `X-RateLimit-Limit` (integer, min 1). Team request quota per rolling minute, when the per-team request limiter applies.
- `X-RateLimit-Remaining` (integer, min 0). Requests left in the per-team quota; zero when this limiter rejects the request.
- `X-RateLimit-Reset` (integer, min 0). Unix timestamp in seconds when the oldest counted request leaves the rolling window, when the per-team request limiter applies. Follow Retry-After on a rejected request.

```json
{
  "success": true
}
```

#### 400

Bad request
- `error` (object, required). Error details returned when the operation fails.
  - `message` (string, required). Human-readable message associated with this result.
  - `type` (string, required). Type discriminator for this object.
  - `code` (number, required). Stable machine-readable code for this result.
  - `error_subcode` (number). Machine-readable error subcode for this error.
  - `error_data` (any, nullable). Specifies error data for this error.
  - `fbtrace_id` (string, required). Identifier for the fbtrace.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 401

Unauthenticated
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 403

Permission error
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 404

Object does not exist
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 429

Rate limited
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```

#### 500

Internal error
Same fields as 400.

Headers:

- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`: described under 200.

```json
{
  "error": {
    "message": "string",
    "type": "string",
    "code": 0,
    "fbtrace_id": "string"
  }
}
```
