---
title: "Continue onboarding session"
url: "https://developer.incode.com/api-reference/b2b-v1-sessions-continue/"
section: "api-reference"
group: "Interview"
version: "v1.1"
status: "live"
endpoint: "POST /omni/b2b/v1/sessions/continue"
---
# Continue onboarding session

`POST /omni/b2b/v1/sessions/continue`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Issues a new token for an ACTIVE existing onboarding session.
The session is located by exactly one of: its sessionId, or its externalId
(the value supplied as externalId on /omni/start).
Providing zero or both identifiers is rejected with 400.

Notes:
- Continuations count against the same per-session limits as end-user continuations.
Works with <Glossary>Admin Token</Glossary>.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes | Default: `1.0` |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sessionId` | string |  | Id of the session to continue. Exactly one of sessionId or externalId must be provided. |
| `externalId` | string |  | Id that identifies the user in the client's system; matches the externalId supplied on /omni/start. Exactly one of sessionId or externalId must be provided. |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sessionId` | string |  | Identifies the onboarding session that is continued. Can be used for fetching data about that session in future calls. |
| `token` | string |  | Internal JWT token used for the future subsequent calls. It is the value for X-Incode-Hardware-Id header in all other calls. |
| `interviewCode` | string |  | This value is used for connecting to conference call. |
| `flowType` | string |  | Type of the flow used. Could be flow (in most cases), or legacy type configuration (not used anymore). Enum: `configuration`, `flow`, `workflow` |
| `idCaptureTimeout` | integer (int32) |  | Number of seconds after which manual capture button should be shown to the user, while capturing ID when ID is detected. |
| `idDetectionTimeout` | integer (int32) |  | Number of seconds after which manual capture button should be shown to the user, if ID is not detected. |
| `selfieCaptureTimeout` | integer (int32) |  | Number of seconds after which manual capture button should be shown to the user, while capturing selfie. |
| `idCaptureRetries` | integer (int32) |  | Number of ID captures after which user should be taken to next screen. |
| `selfieCaptureRetries` | integer (int32) |  | Number of selfie captures after which user should be taken to next screen. |
| `curpValidationRetries` | integer (int32) |  | Number of curp validations after which user should be taken to next screen. (only for Mexico) |

### 400

Custom error statuses: - 4086: Current session continuation period is expired. - 4087: Max number of session continuations reached - 4088: Session is not active - 4089: Zero or both of sessionId / externalId provided

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |

### 404

Session not found for the given sessionId or externalId within the api key's organization

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sessionId` | string |  | Identifies the onboarding session that is continued. Can be used for fetching data about that session in future calls. |
| `token` | string |  | Internal JWT token used for the future subsequent calls. It is the value for X-Incode-Hardware-Id header in all other calls. |
| `interviewCode` | string |  | This value is used for connecting to conference call. |
| `flowType` | string |  | Type of the flow used. Could be flow (in most cases), or legacy type configuration (not used anymore). Enum: `configuration`, `flow`, `workflow` |
| `idCaptureTimeout` | integer (int32) |  | Number of seconds after which manual capture button should be shown to the user, while capturing ID when ID is detected. |
| `idDetectionTimeout` | integer (int32) |  | Number of seconds after which manual capture button should be shown to the user, if ID is not detected. |
| `selfieCaptureTimeout` | integer (int32) |  | Number of seconds after which manual capture button should be shown to the user, while capturing selfie. |
| `idCaptureRetries` | integer (int32) |  | Number of ID captures after which user should be taken to next screen. |
| `selfieCaptureRetries` | integer (int32) |  | Number of selfie captures after which user should be taken to next screen. |
| `curpValidationRetries` | integer (int32) |  | Number of curp validations after which user should be taken to next screen. (only for Mexico) |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/omni/b2b/v1/sessions/continue \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "X-Incode-Hardware-Id: <YOUR_INCODE_HARDWARE_ID>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json"
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/b2b/v1/sessions/continue", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "X-Incode-Hardware-Id": "<YOUR_INCODE_HARDWARE_ID>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "X-Incode-Hardware-Id": "<YOUR_INCODE_HARDWARE_ID>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/b2b/v1/sessions/continue", headers=headers)
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/b2b/v1/sessions/continue"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("X-Incode-Hardware-Id", "<YOUR_INCODE_HARDWARE_ID>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```
require "net/http"
require "json"

uri = URI("https://demo-api.incodesmile.com/omni/b2b/v1/sessions/continue")
req = Net::HTTP::Post.new(uri)
req["x-api-key"] = "<YOUR_API_KEY>"
req["X-Incode-Hardware-Id"] = "<YOUR_INCODE_HARDWARE_ID>"
req["api-version"] = "1.0"
req["Content-Type"] = "application/json"

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
```

### PHP

```
$ch = curl_init("https://demo-api.incodesmile.com/omni/b2b/v1/sessions/continue");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "x-api-key: <YOUR_API_KEY>",
    "X-Incode-Hardware-Id: <YOUR_INCODE_HARDWARE_ID>",
    "api-version: 1.0",
    "Content-Type: application/json",
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);
```

### Example response

```json
{
  "sessionId": "string",
  "token": "string",
  "interviewCode": "string",
  "flowType": "configuration",
  "idCaptureTimeout": 0,
  "idDetectionTimeout": 0,
  "selfieCaptureTimeout": 0,
  "idCaptureRetries": 0,
  "selfieCaptureRetries": 0,
  "curpValidationRetries": 0
}
```
