# Create verification session

Creates a new verification session that will provide a secure context to the verification process. It returns a start token that will be used when initiating the verification process from the client side. This should be called from the backend. See the Quick start guide for details.

Endpoint: POST /api/v1/verification
Security: verify_access_token

## Request fields (application/json):

  - `callback_url` (string)
    The url that the user will be redirected to once the verification process completes. It will contain the session ID used to obtain the verification result

  - `state` (string)
    An opaque string that is used to maintain state between the request and the callback, so it should be unique per request. It will be added as a URL parameter (named state) to the callback URL. The URL parameter should be validated by your server to protect against cross-site request forgery (CSRF) attacks

  - `mock_behavior` (object)
    Sets the behavior for the session for testing purposes only. For example, you can simulate a flow that results in a specific recommendation without performing an actual verification.

  - `mock_behavior.recommendation` (string)
    The desired recommendation for this session.
     See [recommendations](/guides/verify/identity_verification_result/#recommendations)
    Enum: "ALLOW", "CHALLENGE", "DENY"

  - `mock_behavior.processing_time` (string)
    The desired processing time once all the images are captured. Formatted as a duration, e.g "15s", "1m30s"

  - `mock_behavior.force_retry` (boolean)
    Allows simulating a recapture status. If true, a recapture status will be returned for the first attempt to verify the session

  - `mock_behavior.info` (object)
    The desired result for extracted info fields

  - `mock_behavior.info.person_details` (object)
    Information about the person in this session

  - `mock_behavior.info.person_details.given_name` (string)
    Given name
    Example: "Marie"

  - `mock_behavior.info.person_details.surname` (string)
    Family name
    Example: "Curie"

  - `mock_behavior.info.person_details.gender` (string)
    Gender
    Example: "F"

  - `mock_behavior.info.person_details.full_name` (string)
    Full name
    Example: "Marie Salomea Skłodowska-Curies"

  - `mock_behavior.info.person_details.age` (number)
    The person's age, at the current UTC date
    Example: 36

  - `mock_behavior.info.person_details.address` (object)
    The person's address

  - `mock_behavior.info.person_details.address.country` (string)
    ISO 3166-1 alpha-3 country code
    Example: "USA"

  - `mock_behavior.info.person_details.address.region` (string)
    Region
    Example: "Indiana"

  - `mock_behavior.info.person_details.address.city` (string)
    City
    Example: "Indianapolis"

  - `mock_behavior.info.person_details.address.street` (string)
    Street
    Example: "Snowy Ridge Road"

  - `mock_behavior.info.person_details.address.house_number` (string)
    House number
    Example: "1234"

  - `mock_behavior.info.person_details.address.apartment_number` (string)
    Apartment number
    Example: "12"

  - `mock_behavior.info.person_details.address.postcode` (string)
    Postcode
    Example: "56789"

  - `mock_behavior.info.person_details.address.full_address` (string)
    Full address
    Example: "1234 Snowy Ridge Road Indianapolis, IN 56789"

  - `mock_behavior.info.person_details.date_of_birth` (string)
    The person's date of birth, as an ISO-8601 string
    Example: "1867-11-07T00:00:00.000Z"

  - `mock_behavior.info.document_details` (object)
    Information extracted from the document in this session

  - `mock_behavior.info.document_details.type` (string, required)
    The type of this document
    Enum: "national_id", "drivers_license", "passport", "residence_permit", "visa", "firearm_license", "criminal_police_certificate", "health_card", "membership_card", "postal", "social_security_card", "voter_card", "professional_id", "other"

  - `mock_behavior.info.document_details.country` (string)
    The country that issued this document, as an ISO 3166-1 alpha-3 code
    Example: "USA"

  - `mock_behavior.info.document_details.region` (string)
    Sub-division of the document's issuer within the country. For example, this field will contain the issuing state for a US drivers license but will be empty for a US passport.
    Example: "ny"

  - `mock_behavior.info.document_details.issue_date` (string)
    The date the document was issued, as an ISO-8601 string
    Example: "1867-11-07T00:00:00.000Z"

  - `mock_behavior.info.document_details.document_serial_number` (string)
    A value that identifies this specific document. When an ID (for example) expires and a new one is issued, the 'id_value' will remain the same but this value will be different.
    Example: "1234567"

  - `mock_behavior.info.document_details.id_value` (string)
    The value that identifies this specific person, like an ID number
    Example: "123ABC"

  - `mock_behavior.info.document_details.given_name` (string)
    The person's given name, according to this document
    Example: "Marie"

  - `mock_behavior.info.document_details.surname` (string)
    The person's surname, according to this document
    Example: "Curie"

  - `mock_behavior.info.document_details.full_name` (string)
    The person's full name, according to this document
    Example: "Marie Salomea Skłodowska-Curie"

  - `mock_behavior.info.document_details.date_of_birth` (string)
    The person's date of birth, as an ISO-8601 string
    Example: "1867-11-07T00:00:00.000Z"

  - `mock_behavior.info.document_details.valid_until` (string)
    The date the document is expired, as an ISO-8601 string
    Example: "1867-11-07T00:00:00.000Z"

  - `mock_behavior.mock_recommendation` (string)
    Deprecated. see 'recommendation'
    Enum: "ALLOW", "CHALLENGE", "DENY"

  - `start` (object)
    Automatically start the session upon creation. If you intend to send this session to a frontend component (app, sdk, etc), leave this parameter empty - the session will be started by the frontend. However if you want to operate this session via your backend server, this parameter should be filled in.

  - `start.consent` (object)
    Consent for the session

  - `start.consent.granted` (boolean, required)
    Flag confirming consent was granted

  - `start.consent.document_id` (string, required)
    The ID of the consent document presented to the customer

  - `customer_information` (object)
    Additional customer information for this session. This information should not contain any PII data.

  - `customer_information.organization_name` (string)
    Name of the organization or branch

  - `customer_information.organization_id` (string)
    Unique ID of the organization

  - `customer_information.external_user_id` (string)
    Unique identifier of a user. It should be one word and shouldn't not include any PII

  - `time_to_live` (string)
    The time after which this session will be deleted (including all images and verification data). Once deleted, it will no longer be visible in the Admin Portal and the verification result won't be available via API. It should be formatted as a duration, e.g "30d", "60d", "90d". Defaults to "90d", which is 90 days.
    Example: "90d"

  - `auto_start` (boolean)
    Deprecated. See 'start'

## Response 200 fields (application/json):

  - `start_token` (string)
    A single-use token that is used in the request to initiate the verification process. It will bind the session to the device. In case of an auto-start session, this token won't be returned

  - `session_id` (string, required)
    ID of the new verification session, which can be used to check the status and the result

  - `expiration` (string, required)
    The expiration date of this session

  - `missing_images` (array, required)
    The additional image types that need to be added
    Enum: "document_front", "document_back", "selfie"


## Response 400 fields

## Response 401 fields
