Overview

Permanently deletes a stack and all its associated data from your ToolRouter account. This action cannot be undone.

This action is irreversible. Deleting a stack will permanently remove all its servers, configurations, and credentials.

Endpoint

DELETE https://api.toolrouter.ai/v1/stacks/{stack_id}

Authentication

This endpoint requires an API key. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

stack_id
string
required

The unique identifier of the stack to delete

Response

message
string

Confirmation message indicating successful deletion

Example Request

curl -X DELETE "https://api.toolrouter.ai/v1/stacks/stack_123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "message": "Stack stack_123e4567-e89b-12d3-a456-426614174000 deleted successfully"
}

What Gets Deleted

When you delete a stack, the following data is permanently removed:

  • Stack configuration: All stack settings and metadata
  • Server associations: All servers added to the stack
  • Credentials: All stored credentials for servers in the stack
  • Usage analytics: Historical usage data for the stack
  • Secure endpoints: Any secure client endpoints created for the stack

The actual servers in the ToolRouter marketplace are not deleted - only their association with your stack is removed.

Error Responses

401 Unauthorized

Invalid or missing API key

{
  "detail": "Unauthorized"
}
404 Not Found

Stack not found or doesn’t belong to your account

{
  "detail": "Stack not found"
}
429 Too Many Requests

Rate limit exceeded

{
  "detail": "Too many requests"
}
500 Internal Server Error

Server error occurred during deletion

{
  "detail": "Failed to delete stack"
}

Best Practices

Before deleting a stack, consider:

  1. Backup important data: Export any important configurations or credential information
  2. Check dependencies: Ensure no applications are actively using this stack
  3. Review usage: Check if the stack has been used recently
  4. Alternative approach: Consider updating the stack instead of deleting it

Recovery

There is no way to recover a deleted stack. Make sure you want to permanently delete the stack before proceeding.

If you accidentally delete a stack, you will need to:

  1. Create a new stack with the same configuration
  2. Re-add all servers to the new stack
  3. Re-configure all credentials
  4. Update any applications to use the new stack