Delete an API
Deleting an API removes it from APIs with everything that belongs to it. An API that a gateway serves cannot be deleted. A deleted API cannot be restored.
Before you begin
Remove the API from every gateway that serves it. An API added to any environment of a gateway counts as served by that gateway.
To see which gateways serve the API, open its Settings tab and select Danger zone. The Delete this API row names them.
To remove the API from a gateway:
- In the portal, go to Agent Gateway and select the gateway.
- In the APIs tab, select the API.
- Select Remove from gateway and confirm.
- Repeat in each environment of the gateway that has the API. The environment button in the header switches between them.
Removing an API from a gateway makes its operations disappear from that environment immediately. See Add an API to a gateway.
Delete the API
To delete an API:
- In the portal, go to APIs and select the API.
- Select the Settings tab, then Danger zone.
- In the Delete this API row, check that it reads
Not served by any gateway. While a gateway serves the API, Delete API is disabled. - Select Delete API.
- Confirm with Delete.
The portal returns to the APIs list.
The list has the same action in the menu of each API's row. For an API that a gateway serves, the item reads Delete (in use) and is disabled.
What is deleted
| Deleted | Detail |
|---|---|
| Operations and recipes | Including each recipe's revisions. |
| Versions | The draft and every published version. |
| Connections | Endpoints and credential values. |
| Tests | Test plans, suites and their runs. |
| History | The API's analysis and change history. |
| Services and reference repositories | The sources the analysis read. |
| Uploaded code | The ZIP archives of the API and of its services. |
Your repository and your running API are not touched.
Delete uploaded code, in the same section, is a different action. It deletes the stored ZIP archive and keeps the API.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Delete API is disabled | A gateway serves the API. The row names the gateways. | Remove the API from each of them, in every environment. |
The dialog shows This API is used by a gateway |
The API was added to a gateway after the page loaded. | Remove it from the gateway and delete again. |
Next steps
- Create an API: analyze the API again from its code.
- Versions and updates: go back to an earlier version without deleting the API.
- Add an API to a gateway: change or remove what a gateway serves.
Last updated November 13, 2026