> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete macro

> Delete a shared saved reply from your workspace.

Delete a shared saved reply from your workspace. See the [Macros overview](/en/api-reference/macros) for the shared object and scope model.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your workspace API key. The key needs `write` scope.
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>Macro UUID belonging to the authenticated workspace.</ParamField>

This removes the shared template from future macro lists. It does not send a message.

## Response

Returns a confirmation message. Examples use synthetic IDs and timestamps.

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://api-prod.usefini.com/v2/macros/e73b7a87-6eaf-4e77-8d04-5a3f29a52f60/public' \
    --header 'Authorization: Bearer fini_your_api_key'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api-prod.usefini.com/v2/macros/e73b7a87-6eaf-4e77-8d04-5a3f29a52f60/public', {
    method: 'DELETE',
    headers: {"Authorization": "Bearer fini_your_api_key"}
  });
  if (!response.ok) throw new Error(`Request failed: ${response.status}`);
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      "https://api-prod.usefini.com/v2/macros/e73b7a87-6eaf-4e77-8d04-5a3f29a52f60/public",
      headers={"Authorization": "Bearer fini_your_api_key"},
  )
  response.raise_for_status()
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "message": "Macro deleted"
  }
  ```
</ResponseExample>

## Errors

* `400`: Invalid parameters or failed field validation.
* `401`: Missing or invalid credential.
* `403`: Credential lacks the required scope.
* `406`: No workspace is associated with the authenticated user.
* `404`: Macro not found in this workspace.


## Related topics

- [Update macro](/en/api-reference/update-macro.md)
- [Get macro](/en/api-reference/get-macro.md)
- [Create macro](/en/api-reference/create-macro.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.