---
updatedAt: 2026-04-22T15:20:17.000Z
agentTools:
  projectIndex: https://docs.data.one/llms.txt
---

# Complete Session

When the user completes their session with us, they will be redirected to the `partnerRedirectUrl` you originally provided to us along with a `sessionTerminationToken` appended to the query string, like so:

`https://<your-host>/some/path?sessionTerminationToken=XXXX`

You can now call this endpoint with the `sessionTerminationToken` as the `Authorization` header. The token can be provided in either of these formats:
- `Authorization: Bearer <sessionTerminationToken>`
- `Authorization: <sessionTerminationToken>`

You will receive the same Session Response as in the `POST` call. This will classify the Session as `COMPLETED` and a user will not be able to generate further open banking products.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "info": {
    "version": "v1",
    "title": "Hosted Web Journey",
    "description": "Endpoints relating to creating and managing users and sessions. These are only relevant for usage of the direct connection journey, for more details please see the guides on https://docs.data.one."
  },
  "paths": {
    "/v1/sessions/completed": {
      "put": {
        "tags": [
          "Sessions"
        ],
        "operationId": "updateSessionCompleted",
        "summary": "Complete Session",
        "description": "When the user completes their session with us, they will be redirected to the `partnerRedirectUrl` you originally provided to us along with a `sessionTerminationToken` appended to the query string, like so:\n\n`https://<your-host>/some/path?sessionTerminationToken=XXXX`\n\nYou can now call this endpoint with the `sessionTerminationToken` as the `Authorization` header. The token can be provided in either of these formats:\n- `Authorization: Bearer <sessionTerminationToken>`\n- `Authorization: <sessionTerminationToken>`\n\nYou will receive the same Session Response as in the `POST` call. This will classify the Session as `COMPLETED` and a user will not be able to generate further open banking products.",
        "security": [
          {
            "SessionTerminationTokenAuth": [],
            "ApiKeyAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Session updated successfully. Session information received in the session response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                },
                "examples": {
                  "SessionCompletedResponse": {
                    "$ref": "#/components/examples/SessionCompletedResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "API key or Session Termination Token authentication unsuccessful."
          },
          "404": {
            "description": "Session does not exist or has expired."
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api-sandbox.data.one",
      "description": "Hostname for sandbox API"
    }
  ],
  "components": {
    "securitySchemes": {
      "SessionTerminationTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Encrypted JWT",
        "description": "A signed and encrypted Session Termination Token is provided within the query string when a user is redirected back to the partner redirect URL."
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Secret API key used for authentication."
      }
    },
    "schemas": {
      "SessionResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid",
            "description": "Session ID used to uniquely identify sessions."
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "description": "ID used to uniquely identify the user."
          },
          "correlationId": {
            "type": "string",
            "description": "Optional identifier provided by the partner to correlate with a session."
          },
          "status": {
            "type": "string",
            "enum": [
              "IN_PROGRESS",
              "COMPLETED"
            ],
            "description": "Denotes current status of the session."
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time of session creation in ISO 8601 format in UTC timezone."
          },
          "expiry": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time of session expiry in ISO 8601 format in UTC timezone."
          },
          "connectionUrl": {
            "type": "string",
            "description": "URL with which the user can initiate their open banking connection journey. We recommend that the user is redirected to this URL when it is their first time using this service (as it will take them through initiating banking connections for the first time)."
          },
          "managementUrl": {
            "type": "string",
            "description": "URL with which the user can manage their open banking connections. We recommend that the user is redirected to this URL when they already have some open banking connections/products and their requirement is to manage them (as it will take them directly to a list of their open banking connections)."
          }
        },
        "required": [
          "sessionId",
          "userId",
          "status",
          "created",
          "expiry",
          "connectionUrl",
          "managementUrl"
        ]
      }
    },
    "examples": {
      "SessionCompletedResponse": {
        "value": {
          "sessionId": "260ac581-4cce-40d7-9081-707322672bee",
          "userId": "2590eaff-94dc-43f4-be30-bdab6c2cec8b",
          "correlationId": "bb0430df-7ff1-40c2-bace-1a1541c03a6a",
          "status": "COMPLETED",
          "created": "2022-12-12T13:37:42.123Z",
          "expiry": "2022-12-12T14:37:42.123Z",
          "connectionUrl": "https://connect.data.one/partnerName?token=abc",
          "managementUrl": "https://connect.data.one/partnerName/management?token=abc"
        }
      }
    }
  }
}
```