---
title: Delete a stop
description: Delete a stop. This action cannot be undone and will delete all the
  data associated with the stop. If the plan is not writable, this will fail,
  prefer using the [Live Delete Stop API](/api/live-stops/deleteLiveStop)
  instead.
url: /api/stops/deleteStop
---

# Delete a stop

`DELETE /plans/{planId}/stops/{stopId}`

````yaml
openapi: 3.1.0
info:
  title: Spoke API
  version: v1
servers:
  - url: https://api.spoke.com/public/v1
security:
  - BasicAuth: []
paths:
  /plans/{planId}/stops/{stopId}:
    delete:
      operationId: deleteStop
      summary: Delete a stop
      tags:
        - Stops
      description: Delete a stop. This action cannot be undone and will delete all the data associated with the stop. If the plan is not writable, this will fail, prefer using the [Live Delete Stop API](/api/live-stops/deleteLiveStop) instead.
      parameters:
        - schema:
            type: string
            pattern: ^[a-zA-Z0-9---_]{1,50}$
          in: path
          name: planId
          required: true
          description: The plan id
        - schema:
            type: string
            pattern: ^[a-zA-Z0-9---_]{1,50}$
          in: path
          name: stopId
          required: true
          description: The stop id
      responses:
        "204":
          description: Stop deleted successfully
        "400":
          description: ID format is invalid
          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: ID format is invalid
                title: The request is 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
        "403":
          description: Plan is no longer accessible due to data access restrictions. Upgrade to a plan that supports a longer delivery history period to access it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Plan is no longer accessible due to data access restrictions. Upgrade to a plan that supports a longer delivery history period to access it.
                  code:
                    type: string
                    enum:
                      - plan_inaccessible
                  url:
                    type: string
                    enum:
                      - https://dispatch.spoke.com/paywall
                required:
                  - message
                  - code
                  - url
                description: Plan is no longer accessible due to data access restrictions. Upgrade to a plan that supports a longer delivery history period to access it.
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                required:
                  - message
                description: Not Found
        "409":
          description: The plan is not writable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Plan is not writable
                  code:
                    type: string
                    enum:
                      - plan_not_writable
                required:
                  - message
                  - code
                description: The plan is not writable.
                title: Plan is not writable
        "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.
````