Delete a function
SDK platic.tools.functions.delete()
Deletes the function for good: its code, its versions, its catalog tool and its connections to agents.
Example
curl -X DELETE "https://api.platic.ai/v1/tools/functions/$FUNCTION_ID" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.tools.functions.delete("fn_123"); Important
It cannot be undone. To stop using it without losing it, pause the function.
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
functionId | string | Function ID | ✓ |
Response
{
"status": "success",
"message": "Function deleted, with its catalog tool and its agent connections",
"data": {
"id": "Hk2s9QmXc1",
"deleted": true
}
} Errors
| Status | details.code | When |
|---|---|---|
403 | FORBIDDEN or INSUFFICIENT_SCOPE | The credential does not have delete access to Integrations (an OAuth token also needs platica:write) |
404 | NOT_FOUND | The function does not exist in this workspace |
Notes
- Agents that had it connected stop seeing it immediately.
- Bound secrets are not deleted: they stay in Secrets.
- Its executions are kept for 30 days.