---
docId: doc_d81120b6b4e0421f9a0dd26ab5095a82
title: Pause a function
description: "Pause a function to stop agent calls without deleting it."
api:
  group: herramientas/funciones-personalizadas
  auth: bearer
  operations:
    - operationId: pauseFunction
      method: POST
      path: '/v1/tools/functions/{functionId}/pause'
      postmanName: Pause a function
---

<script>
  import { Ways } from '$lib/components';
</script>

# Pause a function

Set the function to `paused` so no agent can see or call it. The code, versions, bound secrets, and agent connections are kept. [Activate it](/api-reference/custom-functions/activate) to use it again.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X POST "https://api.platic.ai/v1/tools/functions/$FUNCTION_ID/pause" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.tools.functions.pause("fn_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `functionId` | string | Function ID | ✓ |

## Request body

It has no body.

## Response

`data` has the complete function, with the fields of [Get a function](/api-reference/custom-functions/get#response-fields).

```json
{
  "status": "success",
  "message": "Function paused: no agent sees it",
  "data": {
    "id": "Hk2s9QmXc1",
    "name": "tax_id_lookup",
    "status": "paused",
    "liveVersion": 2,
    "toolName": "fn_tax_id_lookup",
    "toolId": null,
    "nextStep": "Paused: no agent sees it. Enable it again with POST /v1/tools/functions/Hk2s9QmXc1/enable."
  }
}
```

Some fields are left out of the example.

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `403` | `FORBIDDEN` or `INSUFFICIENT_SCOPE` | The credential does not have write access to Integrations |
| `404` | `NOT_FOUND` | The function does not exist in this workspace |

## Notes

- Pausing the function affects all agents. For a single agent to stop using it, [pause its connection](/api-reference/agents/tools/pause).
- Pausing does not undo what the function already did in other systems.
- To delete it completely, use [Delete a function](/api-reference/custom-functions/delete).
