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

# Create Identity Session

> Starts a hosted identity verification session for a user.

Returns a single-use URL where the user completes IAL2 identity verification with an approved
Credential Service Provider. When verification finishes, Metriport sends an
[`ias.identity.verified`](/medical-api/handling-data/webhooks-with-nq#ias-identity-verified) webhook with a
`proofedIdentityId` you pass on subsequent IAS-purposed queries.

## Body

<ParamField body="patientId" type="string" required>
  The Metriport patient the verified identity will be
  attached to.
</ParamField>

<ParamField body="redirectUrl" type="string" required>
  HTTPS URL where Metriport sends the user after the
  session. Must be on your account's allowlist.
</ParamField>

<ParamField body="metadata" type="object">
  Up to 50 string key/value pairs. Returned on subsequent
  webhook events.
</ParamField>

## Response

<ResponseField name="sessionId" type="string" required>
  Unique identifier for this identity session.
</ResponseField>

<ResponseField name="sessionUrl" type="string" required>
  The URL to redirect the user to. Single-use.
</ResponseField>

<ResponseField name="expiresAt" type="string" required>
  ISO-8601 timestamp when the session URL expires.
</ResponseField>

<ResponseField name="status" type="string" required>
  `pending` on creation. Reaches `completed` or `expired`.
</ResponseField>

```json Response theme={null}
{
  "sessionId": "ids_018f7c2f...",
  "sessionUrl": "https://auth.ias.metriport.com/s/eyJhbGciOi...",
  "expiresAt": "2026-04-29T14:52:11.000Z",
  "status": "pending"
}
```
