# Set FB greeting text

Sets an FB greeting text.

```http
PUT https://api.pozy.ai/v1/accounts/{accountId}/messenger-greeting
```

- Area: Accounts & connections / Account Settings
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `accountId` (string, required)

## Request body

Content type: `application/json`

- `greeting`, array of object, required: At least 1 item
  - `locale`, string, required
  - `text`, string, required: 1 to 160 characters

## Example request

```bash
curl -X PUT "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/messenger-greeting" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "greeting": [
    {
      "locale": "en",
      "text": "Hello from Pozy"
    }
  ]
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/messenger-greeting", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    greeting: [
      {
        locale: "en",
        text: "Hello from Pozy"
      }
    ]
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.put(
    "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/messenger-greeting",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "greeting": [
            {
                "locale": "en",
                "text": "Hello from Pozy",
            },
        ],
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean

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