Skip to main content
PATCH
/
api
/
v1
/
documents
/
{id}
Update a document
curl --request PATCH \
  --url https://app.sajn.se/api/v1/documents/{id} \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "name": "<string>",
  "externalId": "<string>",
  "expiresAt": "<unknown>",
  "responsibleUserId": "<string>",
  "documentMeta": {
    "subject": "<string>",
    "message": "<string>",
    "signingOrder": "PARALLEL",
    "forceReadFullDocument": true,
    "showChatToSigners": true,
    "preferredLanguage": "sv",
    "value": "<string>",
    "redirectUrl": "<string>",
    "redirectEnabled": true
  },
  "documentStyle": {
    "orientation": "PORTRAIT",
    "paddingEnabled": true,
    "backgroundColor": "<string>",
    "backgroundOpacity": 0.5,
    "backgroundImageUrl": "<string>",
    "backgroundImageSize": "FILL",
    "backgroundImagePosition": "TOP_LEFT",
    "backgroundImageRepeat": "REPEAT",
    "backgroundImageOpacity": 0.5,
    "pageSize": "A4"
  },
  "customFields": [
    {
      "customInputId": "<string>",
      "value": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "status": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "externalId": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "documentMeta": {
    "subject": "<string>",
    "message": "<string>",
    "signingOrder": "PARALLEL",
    "forceReadFullDocument": true,
    "showChatToSigners": true,
    "preferredLanguage": "sv",
    "value": "<string>",
    "redirectUrl": "<string>",
    "redirectEnabled": true
  },
  "completedAt": "2023-11-07T05:31:56Z"
}

Headers

authorization
string
required

Bearer token for API authentication

Path Parameters

id
string
required

Body

application/json

Body

name
string
externalId
string
expiresAt
any
responsibleUserId
string

User ID of the person responsible for this document. Must be a member of your organization.

documentMeta
object
documentStyle
object

Document styling configuration including orientation, padding, background, and layout

customFields
object[]

Response

200

id
string
required

Unique document identifier

name
string
required

Document name/title

status
string
required

Document status: DRAFT, SENDING, PENDING, COMPLETED, EXPIRED, CANCELLED, or IMPORTED

createdAt
string<date-time>
required

Date and time when the document was created

updatedAt
string<date-time>
required

Date and time when the document was last updated

externalId
string | null

Your external reference ID for this document

expiresAt
string<date-time> | null

Date and time when the document expires

documentMeta
object

Document metadata including subject, message, signing order, etc.

completedAt
string<date-time> | null

Date and time when all signers completed signing