Case Create
Create a case using POST /api/v2/{company}/case/create.
Case Create
Use this endpoint to create a case with recipients, settings, and documents for signing.
Authorization
All requests to this endpoint require authentication using a Bearer Token.
Use your NextSign API key as the bearer token for this endpoint.
Endpoint
POST https://www.nextsign.dk/api/v2/{company}/case/createPath Parameters
| Parameter | Type | Description |
|---|---|---|
company | string | Your company identifier |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Case title |
referenceId | string | No | Internal reference ID |
folder | string | No | Folder name |
autoSend | boolean | No | Send immediately after creation |
customMessage | boolean | No | Enable a custom recipient message |
message | string | No | Custom recipient message |
user_email | string | No | Sender email address |
emailtemplate | string | No | Email template ID |
settings | object | Yes | Case settings |
signingSchemas | array | No | Allowed signature methods |
recipients | array | Yes | Recipient list |
documents | array | Yes | Documents to sign |
Signing Schemas
urn:grn:authn:dk:mitid:substantialurn:grn:authn:dk:mitid:lowurn:grn:authn:dk:mitid:businessurn:grn:authn:se:bankiddraw-cprdrawsms-email
Recipient Fields
| Field | Type | Description |
|---|---|---|
name | string | Recipient name |
email | string | Recipient email |
signing | boolean | Whether the recipient must sign |
needsCpr | boolean | Whether CPR validation is required |
signingSchema | string | Optional recipient-specific signing method override |
redirectUrl | string | Redirect URL after signing |
addPhone | boolean | Send SMS in addition to email |
phone | string | Phone number for SMS delivery |
order | number | Signing order |
position | string | Signature title/position |
message | string | Custom recipient message |
recipient.signingSchema accepts the same values listed under Signing Schemas.
If recipient.signingSchema is omitted, the recipient falls back to the case-level signingSchemas. If it is set, that recipient is locked to the selected method and cannot choose other signing options during signing.
If needsCpr is true and recipient.signingSchema is set, CPR verification still uses urn:grn:authn:dk:mitid:substantial before the signer continues with the forced signing method.
Document Fields
| Field | Type | Description |
|---|---|---|
name | string | File name including extension |
file | string | Hosted file URL, uploaded file URL, or base64 data |
fileIsBlob | boolean | Set to true for base64 payloads. Omit it when using an uploaded file URL |
signObligated | boolean | Whether signing is required |
documentMustBeRead | boolean | Whether the document must be read before signing |
signatories | array | Selected signatories |
If the combined size of the documents in a case is more than 3.5 MB, upload the files first with Document Upload and use the returned URL in documents[].file.
Large Document Upload Flow
- Upload the file with Document Upload
- Take the
urlfrom the upload response - Pass that URL into
documents[].filein the case creation payload
Example:
{
"documents": [
{
"name": "Lejekontrakt.pdf",
"file": "https://nextsign-dev.hel1.your-objectstorage.com/.../Lejekontrakt.pdf"
}
]
}Example Request
curl --location 'https://www.nextsign.dk/api/v2/{company}/case/create' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "Lejeaftale",
"referenceId": "Jrn. 2342-23",
"folder": "Default",
"autoSend": true,
"customMessage": true,
"message": "Kære {recipient_name}, som aftalt er hermed dokumenter til underskrift",
"user_email": "info@nextengine.dk",
"settings": {
"reminders": {
"send": true,
"amount": 2,
"daysBetween": 3
},
"lang": "da",
"deletion": {
"autoDelete": false,
"days": 30
},
"availability": {
"unlimited": true,
"days": 10
},
"template": 2
},
"signingSchemas": [
"urn:grn:authn:dk:mitid:substantial",
"urn:grn:authn:dk:mitid:business",
"draw"
],
"recipients": [
{
"name": "Andreas Lauridsen",
"email": "al@nextengine.dk",
"signing": true,
"order": 0,
"signingSchema": "urn:grn:authn:dk:mitid:business"
}
],
"documents": [
{
"name": "Lejekontrakt.pdf",
"file": "YOUR_BASE64_STRING_OR_URL",
"fileIsBlob": true
}
]
}'Example Response
{
"data": {
"_id": "66263484e601d81006d1a132",
"title": "Lejeaftale",
"folder": "Default",
"type": "Simple sign",
"createdAt": "2024-04-22T09:57:24.498Z",
"updatedAt": "2024-04-22T09:57:24.498Z"
},
"notices": []
}Response Fields
| Field | Type | Description |
|---|---|---|
data | object | Created case object |
notices | array | Non-fatal notices returned during processing |
Common Error Responses
Validation error:
{
"errors": [
{
"message": "Missing recipients"
}
],
"notices": []
}Server error:
{
"errors": [
{
"message": "Server error",
"error": "Internal error details"
}
]
}