---
title: Delete a stop
description: Delete a stop on live plans. When the plan is not writable, this
  endpoint starts an editing session and the action can be applied through a new
  optimization, or be discarded.
url: /api/live-stops/deleteLiveStop
---

# Delete a stop

`POST /plans/{planId}/stops/{stopId}:liveDelete`

````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}:liveDelete:
    post:
      operationId: deleteLiveStop
      summary: Delete a stop
      tags:
        - Live Stops
      description: Delete a stop on live plans. When the plan is not writable, this endpoint starts an editing session and the action can be applied through a new optimization, or be discarded.
      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:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  pending:
                    type: boolean
                required:
                  - pending
                description: Success
        "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's optimization is in progress.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Plan optimization in progress
                  code:
                    type: string
                    enum:
                      - plan_optimization_in_progress
                required:
                  - message
                  - code
                description: The plan's optimization is in progress.
                title: Plan optimization in progress
        "422":
          description: Failed to delete stop
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    anyOf:
                      - type: string
                        enum:
                          - Stop cannot be removed because it is already complete
                      - type: string
                required:
                  - message
                description: Failed to delete stop
        "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.
````