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

# Cancel Verification

> Cancel a verification session that has not finished.

Cancels a verification session. The session moves to `cancelled` and can no longer be completed by the user. It stays readable through [Get Verification Status](/v2/api-reference/verifications/get-verification).

## Headers

<ParamField header="Authorization" type="string" required>
  `Basic <base64(appId:appSecret)>`. See [Authentication](/v2/api-reference/authentication).
</ParamField>

## Path Parameters

<ParamField path="verificationId" type="string" required>
  The session id.
</ParamField>

## Response

Returns an empty response with HTTP status `204` on success.

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://api.hopae.com/connect/v2/verifications/{verificationId}' \
    --user '{appId}:{appSecret}'
  ```
</RequestExample>

## Errors

| HTTP | Code | When |
| :- | :- | :- |
| 404 | `SESSION_VERIFICATION_NOT_FOUND` | Unknown id, a session of another app, or an environment mismatch |
| 409 | `SESSION_INVALID_STATUS_TRANSITION` | The session is already `completed`, `failed`, or `cancelled` |

<Note>
  Cancelling does not notify the eID provider. A provider-side session the user already opened may stay alive until it expires on its own, but its result will never be applied to the cancelled verification.
</Note>


## OpenAPI

````yaml DELETE /verifications/{verificationId}
openapi: 3.1.0
info:
  title: Hopae Connect Verification API
  version: 2.0.0
servers:
  - url: https://api.hopae.com/connect/v2
    description: Hopae Connect
security:
  - basicAuth: []
tags:
  - name: Verifications
paths:
  /verifications/{verificationId}:
    delete:
      tags:
        - Verifications
      summary: Cancel Verification
      operationId: cancelVerification
      parameters:
        - name: verificationId
          in: path
          required: true
          description: The session id.
          schema:
            type: string
      responses:
        '204':
          description: Cancelled.
        '404':
          description: >-
            `SESSION_VERIFICATION_NOT_FOUND`: unknown id, or created on another
            mode.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: SESSION_VERIFICATION_NOT_FOUND
                  message: Verification not found
                  details: {}
                request_id: req_01J8XQ3V9K2M7N4P
        '409':
          description: '`SESSION_INVALID_STATUS_TRANSITION`: the session has already ended.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: SESSION_INVALID_STATUS_TRANSITION
                  message: Already finished
                  details: {}
                request_id: req_01J8XQ3V9K2M7N4P
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
        request_id:
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        `Basic base64(appId:appSecret)`. See
        [Authentication](/v2/api-reference/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.