Delete an API
SDK platic.tools.apis.delete()
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.
Warning
It cannot be undone. If you only want agents to stop using it and keep its connections, use Pause an API.
Example
curl -X DELETE "https://api.platic.ai/v1/tools/apis/$INTEGRATION_ID" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.tools.apis.delete("api_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
integrationId | string | Custom API ID | ✓ |
Response
{
"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 separately.
- To keep the definition before deleting, clone it.