---
title: "Create Transaction"
slug: "create-transaction"
updated: 2025-06-27T19:50:25Z
published: 2025-06-27T19:50:25Z
canonical: "docs.onespan.com/create-transaction"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onespan.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Create Transaction
Transactions are the main resource in OneSpan Identity Verification (see also [Transaction model](/v1/docs/transaction-model)). This API creates and starts the execution of a new transaction:
- Create transactions with documents, signatures, signers, and an instance of the predefined workflow.
- Create transactions with predefined document templates.
- Create transactions by providing additional metadata that will be retained as electronic evidence.
- Create transactions with an instance of a predefined workflow to request identity validation checks to be executed through OneSpan Identity Verification.
- Create transactions that require implicit or explicit user consent. For an example request, see [Example request with explicit consent](/v1/docs/create-transaction#example-requests). For consent configuration, see [Transaction model](/v1/docs/transaction-model).
> The number of agreements may not exceed a total size of 50 MB, and the size of a single agreement must not exceed 10 MB.
## Syntax
```http
PUT /api/transaction/
```
## Examples
### Example requests
```http
PUT api/transaction/ HTTP/1.1
Host: onespan.com
Accept: application/json, text/javascript
{
"tenant_id":"5e52d7b8-8b18-41a4-9187-d4ce75af6815",
"workflow_id":"80b601c9-f102-4761-9eaa-90ba8fcb58b6",
"urlSetKey":"default",
"brand_id":"a089f718-f12d-4b13-b82e-e1d8b324337d",
"language": "english",
"opaque_id": "WorkflowExternalMitAtPwd=1234",
"configuration": {
"redirects": [
{
"id": "REDIRECT_DOCID_PASS",
"url": "https://www.overriddenUrl.com/?user={{userRole}}&transaction={{transactionId}}&opaqueId={{opaqueId}}"
}
]
},
"users"[...],
"documents"[...]
}
```
#### Example request with explicit consent
```http
PUT api/transaction/ HTTP/1.1
Host: onespan.com
Accept: application/json, text/javascript
{
"tenant_id":"5e52d7b8-8b18-41a4-9187-d4ce75af6815",
"workflow_id":"80b601c9-f102-4761-9eaa-90ba8fcb58b6",
"urlSetKey":"default",
"brand_id":"a089f718-f12d-4b13-b82e-e1d8b324337d",
"language": "english",
"opaque_id": "WorkflowExternalMitAtPwd=1234",
"configuration": {
"redirects": [
{
"id": "REDIRECT_DOCID_PASS",
"url": "https://www.overriddenUrl.com/?user={{userRole}}&transaction={{transactionId}}&opaqueId={{opaqueId}}"
},
"consent": {
"explicit": true,
"text": "I agree to the Terms and Conditions consent."
}
]
},
"users"[...],
"documents"[...]
}
```
### Example response
```http
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"id":"dcaad720-d1e9-47ba-a76b-a6370ef0373b",
"status":"new",
"created":"2017-04-23T18:25:43.511Z",
"tokens": [...],
...
}
```
### Headers
The following headers are included in the request and the response:
#### Request headers
- [Accept](https://tools.ietf.org/html/rfc7231#section-5.3.2): The response content type depends on the Accept header.
- [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2): The OAuth/JWT token to authenticate.
#### Response headers
- [Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5): application/json
### Status codes
Status codes
Status code
Name
Description
200
OK
No error.
400
Bad Request
The transaction data is invalid.
401
Unauthorized
Invalid token.
403
Forbidden
The token does not grant transaction creation rights.