Skip to content

Create a case

POST
/cases
curl --request POST \
--url https://api-sandbox.trustink.io/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "example", "quickSign": true, "pin": "example", "validUntil": "2026-04-15T12:00:00Z", "multiFactorType": "SMS", "callback": { "url": "https://example.com", "authType": "NONE", "clientId": "example", "clientSecret": "example", "tokenUrl": "https://example.com", "tokenAuthMethod": "basic", "scope": "example", "audience": "example", "apiKeyHeader": "example", "apiKeyValue": "example", "signingSecret": "example", "data": { "additionalProperty": "example" } }, "reminders": { "afterDays": [ 1 ] }, "sender": { "name": "example", "replyTo": "hello@example.com" }, "device": { "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }, "participants": [ { "firstName": "example", "lastName": "example", "email": "hello@example.com", "phone": "example", "gender": "Male", "address": { "country": "example", "city": "example", "street": "example", "zip": "example" }, "notify": true, "language": "sk", "signatureFields": [ { "id": "example", "page": 1, "x": 1, "y": 1, "width": 1, "height": 1, "unit": "pt" } ] } ] }'

Creates a case in status NEW and answers where to PUT the PDF. Once it is uploaded (1 KB to 25 MB, Content-Type: application/pdf) the workflow invites the participants, or with quickSign waits for them to sign in person; with device the case opens on that kiosk. See Signature fields and coordinates for signature fields.

Media typeapplication/json
object
title
required
string
>= 1 characters <= 200 characters
quickSign
boolean
pin
string
validUntil
required
string format: date-time
multiFactorType
string
Allowed values: SMS EMAIL
callback
object
url
required
string format: uri
authType
required
string
Allowed values: NONE BASIC API_KEY OAUTH_CLIENT_CREDENTIALS
clientId
string
clientSecret
string
tokenUrl
string format: uri
tokenAuthMethod
string
Allowed values: basic post
scope
string
>= 1 characters <= 1000 characters
audience
string
>= 1 characters <= 1000 characters
apiKeyHeader
string
<= 100 characters
apiKeyValue
string
signingSecret
string
>= 32 characters <= 128 characters
data
object
key
additional properties
reminders
object
afterDays
required
Array<number>
>= 1 items <= 3 items
sender
object
name
string
>= 1 characters <= 80 characters
replyTo
string format: email
device
object
deviceId
required
string format: uuid
participants
required
Array<object>
>= 1 items
object
firstName
required
string
lastName
required
string
email
required
string format: email
phone
string
gender
string
Allowed values: Male Female
address
object
country
string
city
string
street
string
zip
string
notify
boolean
default: true
language
string
default: en
Allowed values: sk en
signatureFields
Array<object>
>= 1 items
object
id
string
>= 1 characters <= 64 characters
page
required
integer
>= 1
x
required
number
y
required
number
width
required
number
> 0
height
required
number
> 0
unit
required
string
Allowed values: pt fraction

The case, and the presigned URL to PUT the PDF to (valid one hour).

Media typeapplication/json
object
case
required
object
id
required
string
title
required
string
status
required
string
Allowed values: NEW IN_PROGRESS DONE UPLOAD_REJECTED EXPIRED CANCELLED FAILED
rejectReason
string
expiredAt
string
cancelledAt
string
cancelReason
string
failedAt
string
failureReason
string
created
string
validUntil
required
string
quickSign
boolean
multiFactorType
string
Allowed values: SMS EMAIL
callback
object
url
required
string
authType
required
string
Allowed values: NONE BASIC API_KEY OAUTH_CLIENT_CREDENTIALS
data
object
key
additional properties
sender
object
name
string
replyTo
string
device
object
deviceId
required
string
originalDocument
required
object
name
string
size
number
sha256
string
url
string
level
string
signedDocument
object
name
string
size
number
sha256
string
url
string
level
string
evidenceDocument
object
name
string
size
number
sha256
string
url
string
level
string
participants
required
Array<object>
object
id
required
string
firstName
required
string
lastName
required
string
email
required
string
phone
string
notify
boolean
language
string
Allowed values: sk en
status
required
string
Allowed values: UNSIGNED SIGNED
signedAt
string
signerUrl
string
signatureFields
required
Array<object>
object
id
required
string
page
required
number
x
required
number
y
required
number
width
required
number
height
required
number
unit
required
string
Allowed values: pt fraction
upload
required
object
type
required
string
Allowed values: PUT
url
required
string
Example
{
"case": {
"status": "NEW",
"multiFactorType": "SMS",
"callback": {
"authType": "NONE"
},
"participants": [
{
"language": "sk",
"status": "UNSIGNED",
"signatureFields": [
{
"unit": "pt"
}
]
}
]
},
"upload": {
"type": "PUT"
}
}

The request failed validation, or the device is not the tenant’s (code UNKNOWN_DEVICE).

Media typeapplication/json
Any of:
object
message
required
string
validationErrors
required
Array<object>
object
instancePath
required
string
keyword
required
string
params
required
object
key
additional properties
message
required
string
Examplegenerated
{
"message": "example",
"validationErrors": [
{
"instancePath": "example",
"keyword": "example",
"params": {
"additionalProperty": "example"
},
"message": "example"
}
]
}

No or an invalid Cognito ID token (API Gateway answers {message} only).

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}

Something failed on the platform, or the request timed out (code TIMEOUT, 503); try again.

Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{
"code": "example",
"message": "example"
}