NextSign API
Forms

Forms Submit

Submit a form using POST /api/v2/{company}/forms/{form_id}/submit.

Forms Submit

Use this endpoint to submit a form with tag values and recipients. A successful submission creates a case from the form configuration.

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}/forms/{form_id}/submit

Path Parameters

ParameterTypeDescription
companystringYour company identifier
form_idstringUnique identifier of the form to submit

Request Body

FieldTypeRequiredDescription
titlestringNoOverride the default form title
customMessagebooleanNoWhether to use a custom message
messagestringNoCustom message shown to recipients
user_namestringNoSender name
user_emailstringNoSender email
statestringNoCase state such as open
signingSchemasarrayNoAllowed signature methods
settingsobjectNoCase settings override
folderstringNoDestination folder
tagsarrayYesTag values to inject into the form
recipientsarrayYesRecipient list for the generated case

The structure of settings, signingSchemas, and recipient objects follows the same pattern as Case Create, including optional recipient.signingSchema overrides.

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 forms submit
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, and is returned back on contract.recipients[].redirectUrl in the response
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

If a submitted recipient uses needsCpr: true, you must also provide recipient.cpr. See Case Create for the full recipient schema and CPR handling notes.

Example Request

cURL
curl --location 'https://www.nextsign.dk/api/v2/{company}/forms/{form_id}/submit' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "title": "Ny Kontrakt",
    "state": "open",
    "tags": [
      {
        "tag": "kunde_fornavn",
        "value": "Andreas",
        "type": "text"
      },
      {
        "tag": "generel_price",
        "value": 4500,
        "type": "number"
      }
    ],
    "recipients": [
      {
        "name": "Andreas Lauridsen",
        "email": "al@nextengine.dk",
        "signing": true,
        "group": 0,
        "redirectUrl": "https://example.com/complete",
        "signingSchema": "draw"
      }
    ]
  }'

Example Response

200 OK
{
  "status": "OK",
  "message": "Contract created and sent",
  "contract": {
    "_id": "66263484e601d81006d1a132",
    "title": "Ny Kontrakt",
    "folder": "Default",
    "type": "Simple sign",
    "recipients": [
      {
        "name": "Andreas Lauridsen",
        "email": "al@nextengine.dk",
        "redirectUrl": "https://example.com/complete",
        "url": "https://www.nextsign.dk/sign/66263484e601d81006d1a132/2/WGOfO-7xvoh-5LPvK-O9cVt-Q1GnY"
      }
    ],
    "createdAt": "2024-04-22T09:57:24.498Z",
    "updatedAt": "2024-04-22T09:57:24.498Z"
  }
}

Response Fields

FieldTypeDescription
statusstringRequest status, typically OK
messagestringHuman-readable result message
contractobjectCreated case object

For open cases, the response includes contract.recipients[].url, which is the direct signing URL for each recipient.

If you submitted recipient.redirectUrl, the same value is returned on contract.recipients[].redirectUrl for that recipient.

Common Error Responses

Validation error:

{
  "message": "Bad request",
  "errors": [
    "No ID provided"
  ]
}

Form not found:

{
  "errors": [
    {
      "code": 400,
      "message": "Bad Request",
      "description": "Form not found"
    }
  ]
}