---
docId: doc_88851056a6ae4fc49c019be12df85eaf
title: Delete an API
description: Delete a custom API, its catalog tool and its connections to agents. It does not delete its secrets.
api:
  group: herramientas/apis-personalizadas
  auth: bearer
  operations:
    - operationId: deleteApiTool
      method: DELETE
      path: '/v1/tools/apis/{integrationId}'
      postmanName: Delete an API
---

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

# Delete an API

Delete an API you no longer need by sending its `integrationId`. Its catalog tool and agent connections are also deleted. Secrets remain in the workspace.

<Note type="warning">

It cannot be undone. If you only want agents to stop using it and keep its connections, use [Pause an API](/api-reference/custom-apis/pause).

</Note>

## Example

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

```bash
curl -X DELETE "https://api.platic.ai/v1/tools/apis/$INTEGRATION_ID" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

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

```ts
await platic.tools.apis.delete("api_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `integrationId` | string | Custom API ID | ✓ |

## Response

```json
{
  "status": "success",
  "message": "API tool deleted successfully",
  "data": {
    "id": "RuzoaswTBBrhutHyKYZn"
  }
}
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | ID of the deleted API |

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `403` | `FORBIDDEN` | The person behind the token does not have access to Integrations, or does not have access to an agent that uses the tool |
| `404` | `NOT_FOUND` | The API does not exist in this workspace |
| `409` | `RESOURCE_CHANGED` | The API changed while it was being deleted. Read it and repeat |
| `409` | `DELETION_IN_PROGRESS` | The deletion is already in progress. Repeat the call to continue it |

## Notes

- Secrets are not deleted with the API. If nobody uses them anymore, [delete them](/api-reference/secrets/delete) separately.
- To keep the definition before deleting, [clone it](/api-reference/custom-apis/clone).
