NextSign API
Tools

create_case

Every field the create_case tool accepts, and what it returns — the same payload as POST /v3/api/cases.

The general-purpose tool for creating cases. It accepts the same payload as POST /v3/api/cases and runs through the same handler — an MCP call and a REST call with the same body behave identically. This page lists the fields so the MCP section stands alone; the REST page carries the deeper narrative and response examples.

The schema is strict: unknown fields are rejected, not ignored, and every problem in a payload comes back at once, each with a field path.

The company is fixed by the connection (the OAuth grant or the API key) — it can never be chosen in the payload. When neither senderId nor senderEmail is given, the case is attributed to the connected user, and the result says so with a sender-defaulted-to-key-creator notice. The REST endpoint's publicUrls query flag is not available over MCP.

Top-level fields

FieldTypeNotes
titlestring, 1–300Required
referenceIdstring ≤ 200Your own external reference
stateopen | draftDefault open. open requires recipients and documents and sends the case; draft creates an incomplete case for later
folderstring ≤ 200Folder name in the dashboard
senderIdObjectIdAttribute the case to this company member (wins over senderEmail)
senderEmailemailAttribute by address instead
messageTemplateIdObjectIdMessage template for the invitation
messageTemplateobjectA template for this case only, instead of messageTemplateId: type plus the email, sms or eboks block, as for create_message_template. Saved with the case, never listed. See A template for this case only
presetIdObjectIdPreset that fills unset settings (and overrides locked fields)
tagsarray ≤ 500Template-tag values for the documents
settingsobjectSee Settings — defaults apply even when omitted
recipientsarray ≤ 100Required non-empty when state is open
documentsarray ≤ 20Required non-empty when state is open

Recipient

FieldTypeNotes
namestring, 1–200Required
emailemailRequired when type is email (the default). Not needed for sms or eboks recipients
phonestring ≤ 40Required when type is sms
signingbooleanDefault true; false makes the recipient a viewer
groupint 0–100Signing order — group 0 signs first, group 1 is asked when group 0 is done. Default 0
typeemail | sms | eboksHow the signing link is delivered. Default email
positionstring ≤ 200Shown under the signature
onBehalfOfstring ≤ 200The organisation the recipient signs for, shown as "On behalf of" under the signature. A MitID Erhverv signer gets the company from their MitID instead
needsCprbooleanRequire CPR validation. Default false
cprstring ≤ 20Pre-filled CPR for validation
signingSchemastringA specific eID (acr value) this recipient must use
redirectUrlhttps URLWhere the signer lands after signing
denyRedirectUrlhttps URLWhere the signer lands after denying the case. redirectUrl is never used after a denial
eboksobjecte-Boks delivery details (see e-Boks object)
messagestring ≤ 2000Personal message to this recipient
messageTemplateIdObjectIdPer-recipient message template
messageTemplateobjectThis recipient's own template for this case only, instead of messageTemplateId

Document

FieldTypeNotes
namestring, 1–300Required
urlhttp(s) URLFetch the file from here
contentbase64 stringThe file itself, ≤ 20 MB decoded (data-URL prefixes are stripped)
documentIdObjectIdA document from your NextSign library — see list_documents
versionIdObjectIdA specific library version — requires documentId
tagsobjectValues for a library .docx's fields, keyed by path. Checked against the document exactly as in create_case_from_document
signObligatedbooleanMust be signed. Default true
documentMustBeReadbooleanMust be opened before signing. Default false
signatoriesint arrayIndexes into recipients — which of them sign this document. Default: all signers

Exactly one of url, content, or documentId must be set per document. For a case built around a single library template, create_case_from_document is the simpler call.

Settings

FieldTypeNotes
autoSendbooleanSend to recipients on creation. Default true
languagestringCase language (da, en, …)
templateint 1–99Email template number
expiresInDaysint 1–3650Signing deadline. Capped at 90 when a recipient has a CPR number or needsCpr
messagestring ≤ 5000Message shown to all recipients
attachSignedFilesbooleanAttach signed PDFs to the completion mail
signingSchemasstring array ≤ 50Allowed eIDs for the whole case (see Signing Schemas)
logostring ≤ 8 MBBase64 image or URL for the case logo
companyNamestring ≤ 200Company name recipients see for this case, in place of yours (see Company name)
remindersobject{ send, amount 1–20, daysBetween 1–365, autoSend }
integrations.microsoft.returnPathstringSite-relative SharePoint path for signed files, e.g. /sites/MySite/Shared Documents

Example call

{
  "title": "Consulting agreement — Q3",
  "recipients": [
    { "name": "Jane Jensen", "email": "jane@example.com" }
  ],
  "documents": [
    { "name": "Agreement.pdf", "url": "https://example.com/agreement.pdf" }
  ],
  "settings": { "expiresInDays": 14 }
}

Result

The tool returns JSON. On success, the same case object as the REST endpoint — id, state, recipients with delivery status, documents, and any notices:

{
  "case": {
    "id": "665f1c2ab4d746b7bb394001",
    "title": "Consulting agreement — Q3",
    "state": "open",
    "recipients": [ { "name": "Jane Jensen", "delivery": { "email": "sent" } } ]
  }
}

On failure the result is marked as an error and explains itself:

{
  "error": "validation-failed",
  "details": [
    { "field": "recipients.0.email", "message": "recipient email is required" }
  ]
}

A malformed payload that doesn't match the schema at all is rejected by the protocol layer as an invalid params error before the tool runs — same information, different envelope.