> ## Documentation Index
> Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete journey state

> Permanently delete a finished GBG Go journey session. You can delete only journeys that completed or failed.

> [!WARNING]
>
> This request deletes the journey's data from the GBG Go API service only. It doesn't delete the journey session record, documents, or biometrics in the Investigation portal. To delete those, for example for a GDPR erasure request, use [Delete journey session](https://docs.go.gbgplc.com/docs/go-v2/platform/investigate/delete-journey-session.md) in the Investigation portal.

Your API credentials need the `DELETE:journey` permission. For step-by-step instructions, error codes, and what the request deletes, see [Delete journey data with the API](https://docs.go.gbgplc.com/docs/go-v2/tutorials/delete-journey-session.md).


## OpenAPI

````yaml docs/go-v2/openapi-v2.json POST /journey/state/delete
openapi: 3.1.0
info:
  title: GBG GO API Reference V2
  description: >-
    The GBG GO V2 API enables authentication, customer journey execution, task
    management, and tracking verification progress.
  version: 2.0.0
  license:
    name: MIT
servers:
  - url: https://eu.platform.go.gbgplc.com/v2/captain/
  - url: https://us.platform.go.gbgplc.com/v2/captain/
  - url: https://au.platform.go.gbgplc.com/v2/captain/
  - url: https://api.auth.gbgplc.com/as/token.oauth2
security: []
paths:
  /journey/state/delete:
    post:
      tags:
        - Journey
      summary: Delete journey state
      description: Permanently deletes a completed journey instance (REQ-02-002).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                instanceId:
                  type: string
                  minLength: 16
                  maxLength: 64
                  pattern: ^[A-Za-z0-9_-]+$
                  description: >-
                    Journey Instance Id, a unique identifier for a started
                    journey instance.
              required:
                - instanceId
              additionalProperties: {}
      responses:
        '200':
          description: Journey deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Journey not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service unavailable (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - CustomerAccess: []
components:
  schemas:
    DeleteResponse:
      type: object
      properties:
        instanceId:
          type: string
        status:
          type: string
          enum:
            - deleted
        message:
          type: string
      required:
        - instanceId
        - status
        - message
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/GbgError'
          minItems: 1
      required:
        - errors
    GbgError:
      type: object
      properties:
        code:
          type: string
          pattern: ^\d{4}$
        name:
          type: string
          minLength: 1
        problem:
          type: string
          minLength: 1
        action:
          type: string
          minLength: 1
        location:
          type: string
          enum:
            - Path
            - Authorization
            - Header
            - Query String
            - Request
            - Body
            - Service
            - Flow
      required:
        - code
        - name
        - problem
        - action
  securitySchemes:
    CustomerAccess:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Customer JWT token for journey lifecycle operations. Required for:
        journey/start, journey/state/fetch, device/start

````