NextSign API
Cases

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/create

Path Parameters

ParameterTypeDescription
companystringYour company identifier

Request Body

FieldTypeRequiredDescription
titlestringYesCase title
referenceIdstringNoInternal reference ID
folderstringNoFolder name
autoSendbooleanNoSend immediately after creation
customMessagebooleanNoEnable a custom recipient message
messagestringNoCustom recipient message
user_emailstringNoSender email address
emailtemplatestringNoEmail template ID
settingsobjectYesCase settings
signingSchemasarrayNoAllowed signature methods
recipientsarrayYesRecipient list
documentsarrayYesDocuments to sign

Signing Schemas

  • urn:grn:authn:dk:mitid:substantial
  • urn:grn:authn:dk:mitid:low
  • urn:grn:authn:dk:mitid:business
  • urn:grn:authn:se:bankid
  • draw-cpr
  • draw
  • sms-email

Recipient Fields

FieldTypeDescription
namestringRecipient name
emailstringRecipient email
signingbooleanWhether the recipient must sign
groupnumberPreferred signing order/group. Lower numbers are invited first
ordernumberLegacy alias for group on create endpoints
needsCprbooleanWhether CPR validation is required
cprstringRecipient CPR number. Required when needsCpr is true
signingSchemastringOptional recipient-specific signing method override
redirectUrlstringRedirect URL after signing. Must be sent inside the recipient object
phonestringPhone number for SMS delivery
positionstringSignature title/position
typestringDelivery type. Supported values are email, phone, and eboks
templatestringOptional recipient-specific template id
messagestringCustom recipient message
eboksobjecte-Boks delivery payload such as kvhx, address, and name

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.

If needsCpr is true, you must also send recipient.cpr in the payload. If recipient.cpr is missing, the signer cannot complete CPR verification.

If you need the CPR number later in your own workflow, store it on your side as well. Do not rely on NextSign as a source for recovering the original plain-text CPR value after processing.

Example recipient with CPR validation:

{
  "name": "Andreas",
  "email": "al@nextsign.dk",
  "cpr": "190497xxxx",
  "needsCpr": true,
  "signing": true
}

Document Fields

FieldTypeDescription
namestringFile name including extension
filestringHosted file URL, uploaded file URL, or base64 data
fileIsBlobbooleanSet to true for base64 payloads. Omit it when using an uploaded file URL
signObligatedbooleanWhether signing is required
documentMustBeReadbooleanWhether the document must be read before signing
signatoriesarraySelected 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

  1. Upload the file with Document Upload
  2. Take the url from the upload response
  3. Pass that URL into documents[].file in the case creation payload

Example:

{
  "documents": [
    {
      "name": "Lejekontrakt.pdf",
      "file": "https://nextsign-dev.hel1.your-objectstorage.com/.../Lejekontrakt.pdf"
    }
  ]
}

Example Request

cURL
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,
        "group": 0,
        "redirectUrl": "https://example.com/complete",
        "signingSchema": "urn:grn:authn:dk:mitid:business"
      }
    ],
    "documents": [
      {
        "name": "Lejekontrakt.pdf",
        "file": "YOUR_BASE64_STRING_OR_URL",
        "fileIsBlob": true
      }
    ]
  }'

Example Response

200 OK
{
  "data": {
    "user": "65ab12cd34ef56ab78cd90ef",
    "nextSignKey": "7QmLp2Xs8HdNa4VrTc9YwKbJf",
    "realtime": false,
    "user_email": "api@example.com",
    "user_company": "65ab12cd34ef56ab78cd90a1",
    "title": "Lejeaftale",
    "referenceId": "REF-48392",
    "bin": false,
    "type": "Simple sign",
    "folder": "Default",
    "folderId": "65ab12cd34ef56ab78cd90a2",
    "signingSchemas": [
      "urn:grn:authn:dk:mitid:substantial",
      "urn:grn:authn:dk:mitid:low",
      "urn:grn:authn:dk:mitid:business",
      "urn:grn:authn:se:bankid",
      "draw-cpr",
      "draw"
    ],
    "settings": {
      "deletion": {
        "autoDelete": false,
        "days": 30
      },
      "availability": {
        "unlimited": false,
        "days": 10,
        "expiration": "2026-05-11T08:54:36.371Z",
        "isExpired": false
      },
      "reminders": {
        "send": true,
        "amount": 2,
        "daysBetween": 3
      },
      "template": 2,
      "lang": "da",
      "allowedRoles": [],
      "allowAPI": false,
      "allowRecipientsViewOthers": true
    },
    "recipients": [
      {
        "group": 0,
        "name": "Mia Sørensen",
        "needsCpr": false,
        "redirectUrl": "https://example.com/complete",
        "position": "Director",
        "cpr": "U2FsdGVkX18nR4mQ2Lp6YvZ8nT1aKs5JwP3eHx9LmNo=",
        "email": "mia.soerensen@example.com",
        "phone": "28123456",
        "sort": 0,
        "template": "",
        "type": "email",
        "signing": true,
        "signed": "pending",
        "signingToken": "Qp7Lm2Va9XrTc4Hs8KdNy5WbE",
        "signingSchema": "",
        "smsEmailVerification": {
          "attempts": 0
        },
        "signer": {
          "signer_type": "recipient",
          "identity": {
            "confirmed": false,
            "cprIsMatch": false
          }
        },
        "message": {
          "enable": true,
          "content": "Insert Custom message per Recipient here."
        },
        "uid": "pL8xRt2Q",
        "_id": "65ab12cd34ef56ab78cd90b1",
        "emailSent": [],
        "log": [],
        "emailEvents": [],
        "events": [],
        "url": "https://www.nextsign.dk/sign/65ab12cd34ef56ab78cd90b0/2/Qp7Lm2Va9XrTc4Hs8KdNy5WbE"
      }
    ],
    "integrations": {
      "microsoft": {
        "status": false
      },
      "uniconta": {
        "status": false
      }
    },
    "errorEmailSent": false,
    "reminders": {
      "allSigned": false,
      "createdAt": "2026-05-01T08:54:36.578Z"
    },
    "documents": [
      {
        "name": "Lejekontrakt.pdf",
        "file": "https://nextsign.hel1.your-objectstorage.com/65ab12cd34ef56ab78cd90a1/case/1777625676406-Lejekontrakt.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=R4ND0MCR3D3NT14LKEY1%2F20260501%2Fhel1%2Fs3%2Faws4_request&X-Amz-Date=20260501T085437Z&X-Amz-Expires=3600&X-Amz-Signature=9f1c2d3a4b5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject",
        "document_id": "https://nextsign.hel1.your-objectstorage.com/65ab12cd34ef56ab78cd90a1/case/1777625676406-Lejekontrakt.pdf",
        "signObligated": true,
        "documentMustBeRead": true,
        "signatories": [],
        "_id": "65ab12cd34ef56ab78cd90b2"
      }
    ],
    "roles": [
      "admin",
      "økonomi",
      "salg",
      "marketing",
      "standard",
      "it",
      "support",
      "hr"
    ],
    "message": "Kære {recipient_name}, som aftalt er hermed dokumenter til underskrift",
    "customMessage": true,
    "autoSend": true,
    "reminderAutoSend": true,
    "attachFiles": true,
    "source": {
      "type": "api"
    },
    "state": "open",
    "_id": "65ab12cd34ef56ab78cd90b0",
    "tags": [],
    "errors": [],
    "otherDocuments": [],
    "signedDocuments": [],
    "logs": [],
    "createdAt": "2026-05-01T08:54:36.581Z",
    "updatedAt": "2026-05-01T08:54:36.581Z",
    "__v": 0,
    "id": "65ab12cd34ef56ab78cd90b0"
  },
  "notices": [
    {
      "message": "No user id provided, adding the email.",
      "using": "65ab12cd34ef56ab78cd90ef"
    },
    {
      "message": "No user name provided"
    },
    {
      "message": "No roles provided - default roles used",
      "using": [
        "admin",
        "økonomi",
        "salg",
        "marketing",
        "standard",
        "it",
        "support",
        "hr"
      ]
    },
    {
      "message": "No email template provided - using default"
    }
  ]
}

Response Fields

FieldTypeDescription
dataobjectCreated case object
noticesarrayNon-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"
    }
  ]
}