---
title: "Create SDK session"
method: POST
path: "/v1/workflows/{workflowId}/validationcode"
tags: ["Workflows"]
---

# Create SDK session

`POST /v1/workflows/{workflowId}/validationcode`

Use this endpoint to create an App Drop-in or Web SDK session for a workflow. <br /><br /><img src="https://files.readme.io/310d4d3-Inline_Caution.svg" align="left" alt="Important" /> **Important:** <br />• SDK validation codes are single use and expire after <strong>2 hours</strong>. <br />• If the client stops in the middle of the workflow, you need to create a new SDK session. <br />• When the client closes the app or browser, the `validationCode` is invalidated and cleared from the cache.

## Path parameters

- `workflowId` string, required

## Headers

- `Authorization` string, required — The `access_token` returned in your most recent [Create access token](https://docs.fourthline.com/reference/create-access-token) response.

## Request body

- object
  - `target` 'Mobile' | 'Web', required — The type of SDK session. <br />Enum: <br />• `Mobile`: App Drop-in session <br />• `Web`: Web SDK session

## Response `200`

Validation code returned

- object
  - `validationCode` string — The single-use validation code to link the SDK session to the workflow. <br /><br />Format: Alphanumerical string of 8 characters
  - `expiryDateTime` string, Datetime — The timestamp for when the validation code expires (**2 hours** after creation) <br /><br />Format: ISO 8601 UTC date and time

## Other responses

- `400` — Invalid request parameters
- `401` — Invalid or expired access token
- `404` — Resource not found
- `500` — Unexpected server error

---

[API](https://skmtc.net/fourthline/apis/fourthline-apis.md) · [All operations](https://skmtc.net/fourthline/apis/fourthline-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fourthline/fourthline-apis/versions/7991ae7c8383/schema)
