---
title: Remove a depot
description: Remove a depot
url: /api/depots/deleteDepot
---

# Remove a depot

`DELETE /depots/{depotId}`

````yaml
openapi: 3.1.0
info:
  title: Spoke API
  version: v1
servers:
  - url: https://api.spoke.com/public/v1
security:
  - BasicAuth: []
paths:
  /depots/{depotId}:
    delete:
      operationId: deleteDepot
      summary: Remove a depot
      tags:
        - Depots
      parameters:
        - schema:
            type: string
            pattern: ^[a-zA-Z0-9---_]{1,50}$
          in: path
          name: depotId
          required: true
          description: The depot id
      responses:
        "204":
          description: Depot removed successfully
        "400":
          description: The request was invalid
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      message:
                        type: string
                        description: The error message.
                      code:
                        type: string
                        description: The error code.
                      param:
                        type: string
                        description: The parameter that caused the error.
                      url:
                        type: string
                        description: The URL with more information about the error.
                    required:
                      - message
                    description: The request has errors. Either syntactic or semantic
                  - type: object
                    properties:
                      message:
                        type: string
                        enum:
                          - Depot cannot be deleted
                    required:
                      - message
                    description: The depot cannot be deleted because because a pre-condition was not met
                    title: Depot cannot be deleted
                description: The request was invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Unauthorized
        "500":
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: An internal server error occurred
        default:
          description: The default error model
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: The default error model
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: Use the API key as the username and leave the password empty.
````