> For the complete documentation index, see [llms.txt](https://api.veratad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.veratad.com/vx/overview/createtoken.md).

# Create Token

## Create Token

<mark style="color:green;">`POST`</mark> `https://vx-be.idresponse.com/token/create`

This endpoint creates your token with associated settings to access a document iFrame session.

#### Request Body

| Name                                   | Type   | Description                                          |
| -------------------------------------- | ------ | ---------------------------------------------------- |
| user<mark style="color:red;">\*</mark> | string | Your Veratad API username                            |
| pass<mark style="color:red;">\*</mark> | string | Your Veratad API Password                            |
| journey\_id                            | String | The VX journey ID to be loaded with this token       |
| settings\_id                           | String | The settings profile ID to be loaded with this token |
| branding\_id                           | String | The branding ID to be loaded with this token         |

{% tabs %}
{% tab title="200 Token successfully created." %}

```
{
    "result": "Success",
    "message": "Token created successfully",
    "token": "393d50f9-2703-4100-9e4b-dfd8e4fda493",
    "age": "21+",
    "rules": "DCAMS5_0_RuleSet_NAME_DOB",
    "store_on": "FAIL",
    "company_name_for_email": "Company ABC",
    "email_logo_link": "https://yourcompany.com/logo.png",
    "email_logo_height": "50",
    "email_logo_width": "80",
    "dcams_manual_rules": "DCAMS5_0_Manual_Review_RuleSet_NAME_DOB"
}
```

{% endtab %}

{% tab title="400 Missing a required input" %}

```
{
    "result": "Error",
    "message": "Missing a required input",
    "token": ""
}

{
    "result": "Error",
    "message": "Invalid age submitted. Must conform to age+ like 21+",
    "token": ""
}

{
    "result": "Error",
    "message": "Invalid ruleset submitted. Please check the documentation",
    "token": ""
}

{
    "result": "Error",
    "message": "Invalid store_on value. Must be PASS, FAIL or ALL",
    "token": ""
}
```

{% endtab %}

{% tab title="401 Username or password is incorrect." %}

```
{
    "result": "Error",
    "message": "Either your username or password is incorrect",
    "token": ""
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**IMPORTANT:** The token is only good for 6 hours. It is recommended that you generate a new token on each iFrame request.
{% endhint %}

## Request Body

```json
{
    "user": "USERNAME | API KEY",
    "pass": "PASSWORD",
    "journey_id": "SET | DEFAULT", 
    "settings_id": "SET | DEFAULT", 
    "branding_id": "SET | DEFAULT"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://api.veratad.com/vx/overview/createtoken.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
