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.

Example

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

Path parameters

ParameterTypeDescriptionRequired
integrationIdstringCustom API ID✓

Response

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

Response fields

FieldTypeDescription
idstringID of the deleted API

Errors

Statusdetails.codeWhen
403FORBIDDENThe person behind the token does not have access to Integrations, or does not have access to an agent that uses the tool
404NOT_FOUNDThe API does not exist in this workspace
409RESOURCE_CHANGEDThe API changed while it was being deleted. Read it and repeat
409DELETION_IN_PROGRESSThe 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.