> ## Documentation index
> Fetch the complete documentation index at: https://workover.io/docs/llms.txt

# Add or update a macro

POST`/messenger/{messengerId}/macros`

Adds a macro from `{ title, actions }`, or changes the actions of the one with that title (any case), keeping its id; `created` says which. Owners and admins. Safe to repeat.

## Path Parameters

`messengerId`

numberrequired

## Response

201

**cURL**

```bash
curl --request POST \
  --url 'https://api.workover.io/messenger/{messengerId}/macros'
```

**JavaScript**

```javascript
const options = {
  method: 'POST'
};

fetch('https://api.workover.io/messenger/{messengerId}/macros', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

**Python**

```python
import requests

url = "https://api.workover.io/messenger/{messengerId}/macros"

response = requests.post(url)

print(response.text)
```
